@vercel/otel 1.12.0 → 1.13.1

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,5 +1,11 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import type * as http from 'node:http';
4
+ import type * as https from 'node:https';
1
5
  import type { Attributes, TracerProvider } from "@opentelemetry/api";
2
6
  import type { Instrumentation, InstrumentationConfig } from "@opentelemetry/instrumentation";
7
+ type Http = typeof http;
8
+ type Https = typeof https;
3
9
  /**
4
10
  * Configuration for the "fetch" instrumentation.
5
11
  *
@@ -81,6 +87,12 @@ export declare class FetchInstrumentation implements Instrumentation {
81
87
  setConfig(): void;
82
88
  setTracerProvider(tracerProvider: TracerProvider): void;
83
89
  setMeterProvider(): void;
90
+ private shouldIgnore;
91
+ private shouldPropagate;
92
+ private startSpan;
93
+ instrumentHttp(httpModule: Http | Https, protocolFromModule: 'https:' | 'http:'): void;
94
+ instrumentFetch(): void;
84
95
  enable(): void;
85
96
  disable(): void;
86
97
  }
98
+ export {};
@@ -0,0 +1,18 @@
1
+ export declare const HTTP_METHOD = "http.method";
2
+ export declare const HTTP_URL = "http.url";
3
+ export declare const HTTP_HOST = "http.host";
4
+ export declare const HTTP_SCHEME = "http.scheme";
5
+ export declare const HTTP_STATUS_CODE = "http.status_code";
6
+ export declare const HTTP_USER_AGENT = "http.user_agent";
7
+ export declare const HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = "http.response_content_length_uncompressed";
8
+ export declare const NET_PEER_PORT = "net.peer.port";
9
+ export declare const NET_PEER_NAME = "net.peer.name";
10
+ export declare const CLOUD_REGION = "cloud.region";
11
+ export declare const DEPLOYMENT_ENVIRONMENT = "deployment.environment";
12
+ export declare const CLOUD_PROVIDER = "cloud.provider";
13
+ export declare const PROCESS_RUNTIME_NAME = "process.runtime.name";
14
+ export declare const VCS_REPOSITORY_REF_VERSION = "vcs.repository.ref.revision";
15
+ export declare const FAAS_INVOKED_REGION = "faas.invoked_region";
16
+ export declare const FAAS_INVOCATION_ID = "faas.invocation_id";
17
+ export declare const SERVICE_NAME = "service.name";
18
+ export declare const SERVICE_VERSION = "service.version";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/otel",
3
- "version": "1.12.0",
3
+ "version": "1.13.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -64,7 +64,6 @@
64
64
  "@opentelemetry/sdk-logs": "^0.46.0",
65
65
  "@opentelemetry/sdk-metrics": "^1.19.0",
66
66
  "@opentelemetry/sdk-trace-base": "^1.19.0",
67
- "@opentelemetry/semantic-conventions": "^1.19.0",
68
67
  "@types/node": "18.15.11",
69
68
  "esbuild": "^0.19.4",
70
69
  "protobufjs": "^7.2.6",
@@ -73,17 +72,17 @@
73
72
  "typedoc": "^0.25.8",
74
73
  "typescript": "^5",
75
74
  "vitest": "0.33.0",
76
- "typescript-config": "1.0.0",
77
- "eslint-config": "1.0.0"
75
+ "eslint-config": "1.0.0",
76
+ "typescript-config": "1.0.0"
78
77
  },
79
78
  "peerDependencies": {
80
- "@opentelemetry/api": "^1.7.0",
81
- "@opentelemetry/api-logs": ">=0.46.0 && <1.0.0",
82
- "@opentelemetry/instrumentation": ">=0.46.0 && <1.0.0",
83
- "@opentelemetry/resources": "^1.19.0",
84
- "@opentelemetry/sdk-logs": ">=0.46.0 && <1.0.0",
85
- "@opentelemetry/sdk-metrics": "^1.19.0",
86
- "@opentelemetry/sdk-trace-base": "^1.19.0"
79
+ "@opentelemetry/api": ">=1.7.0 <2.0.0",
80
+ "@opentelemetry/api-logs": ">=0.46.0 <0.200.0",
81
+ "@opentelemetry/instrumentation": ">=0.46.0 <0.200.0",
82
+ "@opentelemetry/resources": ">=1.19.0 <2.0.0",
83
+ "@opentelemetry/sdk-logs": ">=0.46.0 <0.200.0",
84
+ "@opentelemetry/sdk-metrics": ">=1.19.0 <2.0.0",
85
+ "@opentelemetry/sdk-trace-base": ">=1.19.0 <2.0.0"
87
86
  },
88
87
  "scripts": {
89
88
  "build": "pnpm clean && pnpm tsx build.ts && pnpm build-types && pnpm build-site",