@traceloop/instrumentation-bedrock 0.22.6 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  import { InstrumentationBase, InstrumentationModuleDefinition } from "@opentelemetry/instrumentation";
2
2
  import { BedrockInstrumentationConfig } from "./types";
3
3
  import type * as bedrock from "@aws-sdk/client-bedrock-runtime";
4
+ export declare const bedrockFinishReasonMap: Record<string, string>;
4
5
  export declare class BedrockInstrumentation extends InstrumentationBase {
5
6
  protected _config: BedrockInstrumentationConfig;
6
7
  constructor(config?: BedrockInstrumentationConfig);
@@ -15,7 +16,10 @@ export declare class BedrockInstrumentation extends InstrumentationBase {
15
16
  private _endSpan;
16
17
  private _setRequestAttributes;
17
18
  private _setResponseAttributes;
19
+ private _handleNovaStreamingMetadata;
18
20
  private _shouldSendPrompts;
21
+ private _getOperationType;
22
+ private _getStreamChunkContent;
19
23
  private _extractVendorAndModel;
20
24
  }
21
25
  //# sourceMappingURL=instrumentation.d.ts.map
@@ -1,4 +1,11 @@
1
1
  import { InstrumentationConfig } from "@opentelemetry/instrumentation";
2
+ export declare enum BedrockVendor {
3
+ AI21 = "ai21",
4
+ AMAZON = "amazon",
5
+ ANTHROPIC = "anthropic",
6
+ COHERE = "cohere",
7
+ META = "meta"
8
+ }
2
9
  export interface BedrockInstrumentationConfig extends InstrumentationConfig {
3
10
  /**
4
11
  * Whether to log prompts, completions and embeddings on traces.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@traceloop/instrumentation-bedrock",
3
- "version": "0.22.6",
3
+ "version": "0.24.0",
4
4
  "description": "Amazon Bedrock Instrumentation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -10,7 +10,8 @@
10
10
  "build": "rollup -c",
11
11
  "lint": "eslint .",
12
12
  "lint:fix": "eslint . --fix",
13
- "test": "ts-mocha -p tsconfig.test.json 'tests/**/*.test.ts' --timeout 20000"
13
+ "test": "ts-mocha -p tsconfig.test.json 'tests/**/*.test.ts' --timeout 20000",
14
+ "test:unit": "ts-mocha -p tsconfig.test.json 'tests/semconv.test.ts' 'tests/finish_reasons.test.ts' 'tests/content_parts.test.ts' --timeout 20000"
14
15
  },
15
16
  "keywords": [
16
17
  "opentelemetry",
@@ -41,8 +42,9 @@
41
42
  "@opentelemetry/api": "^1.9.0",
42
43
  "@opentelemetry/core": "^2.0.1",
43
44
  "@opentelemetry/instrumentation": "^0.203.0",
44
- "@opentelemetry/semantic-conventions": "^1.38.0",
45
- "@traceloop/ai-semantic-conventions": "0.22.5",
45
+ "@opentelemetry/semantic-conventions": "^1.40.0",
46
+ "@traceloop/ai-semantic-conventions": "0.24.0",
47
+ "@traceloop/instrumentation-utils": "0.24.0",
46
48
  "tslib": "^2.8.1"
47
49
  },
48
50
  "devDependencies": {
@@ -56,6 +58,6 @@
56
58
  "@types/mocha": "^10.0.10",
57
59
  "ts-mocha": "^11.1.0"
58
60
  },
59
- "homepage": "https://github.com/traceloop/openllmetry-js/tree/main/packages/instrumentation-openai",
60
- "gitHead": "fa98799ee0752bd76906709752800a66fbca8210"
61
+ "homepage": "https://github.com/traceloop/openllmetry-js/tree/main/packages/instrumentation-bedrock",
62
+ "gitHead": "a86954519c53784122181a209bd10a66b79ed1c7"
61
63
  }