@arizeai/phoenix-otel 0.4.0 → 0.4.2

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.
package/package.json CHANGED
@@ -1,60 +1,60 @@
1
1
  {
2
2
  "name": "@arizeai/phoenix-otel",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Otel registration and convenience methods",
5
- "main": "dist/src/index.js",
6
- "module": "dist/esm/index.js",
7
- "types": "dist/src/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/esm/index.js",
11
- "require": "./dist/src/index.js"
12
- }
13
- },
14
- "files": [
15
- "dist",
16
- "src",
17
- "package.json"
18
- ],
19
5
  "keywords": [
20
- "otel",
21
6
  "arize",
22
- "phoenix",
23
7
  "llm",
8
+ "otel",
9
+ "phoenix",
24
10
  "tracing"
25
11
  ],
26
- "author": "oss@arize.com",
27
- "license": "Apache-2.0",
28
12
  "homepage": "https://github.com/Arize-ai/phoenix/tree/main/js/packages/phoenix-otel",
13
+ "bugs": {
14
+ "url": "https://github.com/Arize-ai/phoenix/issues"
15
+ },
16
+ "license": "Apache-2.0",
17
+ "author": "oss@arize.com",
29
18
  "repository": {
30
19
  "type": "git",
31
20
  "url": "git+https://github.com/Arize-ai/phoenix.git"
32
21
  },
33
- "bugs": {
34
- "url": "https://github.com/Arize-ai/phoenix/issues"
22
+ "files": [
23
+ "dist",
24
+ "src",
25
+ "package.json"
26
+ ],
27
+ "main": "dist/src/index.js",
28
+ "module": "dist/esm/index.js",
29
+ "types": "dist/src/index.d.ts",
30
+ "exports": {
31
+ ".": {
32
+ "import": "./dist/esm/index.js",
33
+ "require": "./dist/src/index.js"
34
+ }
35
35
  },
36
36
  "dependencies": {
37
37
  "@arizeai/openinference-semantic-conventions": "^1.1.0",
38
38
  "@arizeai/openinference-vercel": "^2.7.0",
39
39
  "@opentelemetry/api": "^1.9.0",
40
40
  "@opentelemetry/core": "^1.25.1",
41
- "@opentelemetry/exporter-trace-otlp-proto": "^0.57.2",
41
+ "@opentelemetry/exporter-trace-otlp-proto": "^0.205.0",
42
42
  "@opentelemetry/instrumentation": "^0.57.2",
43
43
  "@opentelemetry/resources": "^2.0.0",
44
- "@opentelemetry/sdk-trace-base": "^1.30.1",
45
- "@opentelemetry/sdk-trace-node": "^1.30.1"
44
+ "@opentelemetry/sdk-trace-base": "^2.5.1",
45
+ "@opentelemetry/sdk-trace-node": "^2.5.1"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/node": "^24.9.1",
49
49
  "vitest": "^4.0.10"
50
50
  },
51
51
  "scripts": {
52
- "clean": "rimraf dist",
53
- "prebuild": "pnpm run clean",
54
52
  "build": "tsc --build tsconfig.json tsconfig.esm.json && tsc-alias -p tsconfig.esm.json",
53
+ "clean": "rimraf dist",
55
54
  "postbuild": "echo '{\"type\": \"module\"}' > ./dist/esm/package.json",
56
- "type:check": "tsc --noEmit",
55
+ "prebuild": "pnpm run clean",
57
56
  "test": "vitest run",
58
- "test:watch": "vitest watch"
57
+ "test:watch": "vitest watch",
58
+ "typecheck": "tsc --noEmit"
59
59
  }
60
60
  }
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export {
2
2
  trace,
3
3
  context,
4
- type DiagLogLevel,
4
+ DiagLogLevel,
5
5
  type Tracer,
6
6
  SpanStatusCode,
7
7
  } from "@opentelemetry/api";
package/src/register.ts CHANGED
@@ -3,20 +3,16 @@ import {
3
3
  OpenInferenceBatchSpanProcessor,
4
4
  OpenInferenceSimpleSpanProcessor,
5
5
  } from "@arizeai/openinference-vercel";
6
-
7
- import { getEnvApiKey, getEnvCollectorURL } from "./config";
8
-
9
- import { diag, DiagConsoleLogger, DiagLogLevel } from "@opentelemetry/api";
6
+ import type { DiagLogLevel } from "@opentelemetry/api";
7
+ import { diag, DiagConsoleLogger } from "@opentelemetry/api";
10
8
  import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto";
11
- import {
12
- Instrumentation,
13
- registerInstrumentations,
14
- } from "@opentelemetry/instrumentation";
9
+ import type { Instrumentation } from "@opentelemetry/instrumentation";
10
+ import { registerInstrumentations } from "@opentelemetry/instrumentation";
15
11
  import { resourceFromAttributes } from "@opentelemetry/resources";
16
- import {
17
- NodeTracerProvider,
18
- SpanProcessor,
19
- } from "@opentelemetry/sdk-trace-node";
12
+ import type { SpanProcessor } from "@opentelemetry/sdk-trace-node";
13
+ import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
14
+
15
+ import { getEnvApiKey, getEnvCollectorURL } from "./config";
20
16
 
21
17
  /**
22
18
  * Type definition for HTTP headers used in OTLP communication
@@ -189,7 +185,7 @@ export type RegisterParams = {
189
185
  * @example
190
186
  * Full configuration with custom settings:
191
187
  * ```typescript
192
- * import { register } from '@arizeai/phoenix-otel';
188
+ * import { DiagLogLevel, register } from '@arizeai/phoenix-otel';
193
189
  * import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
194
190
  * import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express';
195
191
  *
@@ -229,6 +225,8 @@ export type RegisterParams = {
229
225
  * @example
230
226
  * Debugging configuration:
231
227
  * ```typescript
228
+ * import { DiagLogLevel, register } from '@arizeai/phoenix-otel';
229
+ *
232
230
  * const provider = register({
233
231
  * projectName: 'debug-app',
234
232
  * url: 'http://localhost:6006',
package/src/utils.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AttributeValue } from "@opentelemetry/api";
1
+ import type { AttributeValue } from "@opentelemetry/api";
2
2
 
3
3
  export function objectAsAttributes<T extends Record<string, unknown>>(
4
4
  obj: T