@vercel/otel 1.13.0 → 2.0.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.
- package/dist/edge/index.js +11 -11
- package/dist/edge/index.js.map +4 -4
- package/dist/node/chunk-5MU5Z6L3.js +8 -0
- package/dist/node/chunk-5MU5Z6L3.js.map +7 -0
- package/dist/node/chunk-NWCAEW5Y.js +8 -0
- package/dist/node/chunk-NWCAEW5Y.js.map +7 -0
- package/dist/node/getMachineId-bsd-WEBNKY2R.js +8 -0
- package/dist/node/getMachineId-bsd-WEBNKY2R.js.map +7 -0
- package/dist/node/getMachineId-darwin-LT47KAXP.js +9 -0
- package/dist/node/getMachineId-darwin-LT47KAXP.js.map +7 -0
- package/dist/node/getMachineId-linux-LTVQO6VW.js +8 -0
- package/dist/node/getMachineId-linux-LTVQO6VW.js.map +7 -0
- package/dist/node/getMachineId-unsupported-UKWBA27G.js +8 -0
- package/dist/node/getMachineId-unsupported-UKWBA27G.js.map +7 -0
- package/dist/node/getMachineId-win-NLJKOPY6.js +8 -0
- package/dist/node/getMachineId-win-NLJKOPY6.js.map +7 -0
- package/dist/node/index.js +11 -8
- package/dist/node/index.js.map +4 -4
- package/dist/types/exporters/exporter-trace-otlp-proto-fetch.d.ts +0 -3
- package/dist/types/exporters/proto.d.ts +1 -1
- package/dist/types/instrumentations/fetch.d.ts +3 -3
- package/dist/types/types.d.ts +9 -9
- package/dist/types/utils/env-parser.d.ts +5 -0
- package/package.json +21 -22
|
@@ -6,10 +6,7 @@ import type { OTLPExporterConfig } from "./config";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class OTLPHttpProtoTraceExporter implements SpanExporter {
|
|
8
8
|
constructor(config?: OTLPExporterConfig);
|
|
9
|
-
/** See `SpanExporter#export()` */
|
|
10
9
|
export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): void;
|
|
11
|
-
/** See `SpanExporter#shutdown()` */
|
|
12
10
|
shutdown(): Promise<void>;
|
|
13
|
-
/** See `SpanExporter#forceFlush()` */
|
|
14
11
|
forceFlush(): Promise<void>;
|
|
15
12
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* The OTLP protocol is very stable, so these steps would only need to be done rarely.
|
|
9
9
|
*/
|
|
10
|
-
import type { IExportTraceServiceRequest } from "@opentelemetry/otlp-transformer";
|
|
10
|
+
import type { IExportTraceServiceRequest } from "@opentelemetry/otlp-transformer/build/src/trace/internal-types";
|
|
11
11
|
import { Writer } from "protobufjs/minimal";
|
|
12
12
|
export declare function encodeTraceServiceRequest(message: IExportTraceServiceRequest): Uint8Array;
|
|
13
13
|
export declare function ExportTraceServiceRequest_encode(message: IExportTraceServiceRequest, writer: Writer): Writer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
import type * as http from
|
|
4
|
-
import type * as https from
|
|
3
|
+
import type * as http from "node:http";
|
|
4
|
+
import type * as https from "node:https";
|
|
5
5
|
import type { Attributes, TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
import type { Instrumentation, InstrumentationConfig } from "@opentelemetry/instrumentation";
|
|
7
7
|
type Http = typeof http;
|
|
@@ -90,7 +90,7 @@ export declare class FetchInstrumentation implements Instrumentation {
|
|
|
90
90
|
private shouldIgnore;
|
|
91
91
|
private shouldPropagate;
|
|
92
92
|
private startSpan;
|
|
93
|
-
instrumentHttp(httpModule: Http | Https, protocolFromModule:
|
|
93
|
+
instrumentHttp(httpModule: Http | Https, protocolFromModule: "https:" | "http:"): void;
|
|
94
94
|
instrumentFetch(): void;
|
|
95
95
|
enable(): void;
|
|
96
96
|
disable(): void;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { TextMapPropagator, ContextManager, TextMapGetter, Attributes } from "@opentelemetry/api";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { Instrumentation } from "@opentelemetry/instrumentation";
|
|
3
|
+
import type { ResourceDetector } from "@opentelemetry/resources";
|
|
4
4
|
import type { LogRecordProcessor } from "@opentelemetry/sdk-logs";
|
|
5
5
|
import type { IdGenerator, Sampler, SpanExporter, SpanLimits, SpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
6
|
-
import type { MetricReader,
|
|
6
|
+
import type { MetricReader, ViewOptions } from "@opentelemetry/sdk-metrics";
|
|
7
7
|
import type { FetchInstrumentationConfig } from "./instrumentations/fetch";
|
|
8
8
|
export type PropagatorOrName = TextMapPropagator | "auto" | "none" | "tracecontext" | "baggage";
|
|
9
9
|
export type SampleOrName = Sampler | "auto" | "always_off" | "always_on" | "parentbased_always_off" | "parentbased_always_on" | "parentbased_traceidratio" | "traceidratio";
|
|
10
10
|
export type SpanProcessorOrName = SpanProcessor | "auto";
|
|
11
11
|
export type SpanExporterOrName = SpanExporter | "auto";
|
|
12
|
-
export type InstrumentationOptionOrName =
|
|
12
|
+
export type InstrumentationOptionOrName = Instrumentation | "fetch" | "auto";
|
|
13
13
|
export interface InstrumentationConfiguration {
|
|
14
14
|
fetch?: FetchInstrumentationConfig;
|
|
15
15
|
}
|
|
@@ -39,7 +39,7 @@ export interface Configuration {
|
|
|
39
39
|
*
|
|
40
40
|
* Any additional attributes will be merged with the default attributes.
|
|
41
41
|
*/
|
|
42
|
-
attributes?:
|
|
42
|
+
attributes?: Attributes;
|
|
43
43
|
/**
|
|
44
44
|
* This configuration is used to compute root span's attributes based on the request's headers.
|
|
45
45
|
* The value can be one of the following:
|
|
@@ -49,7 +49,7 @@ export interface Configuration {
|
|
|
49
49
|
* a set of computed attributes.
|
|
50
50
|
*/
|
|
51
51
|
attributesFromHeaders?: AttributesFromHeaders;
|
|
52
|
-
resourceDetectors?:
|
|
52
|
+
resourceDetectors?: ResourceDetector[];
|
|
53
53
|
autoDetectResources?: boolean;
|
|
54
54
|
/**
|
|
55
55
|
* A set of instrumentations.
|
|
@@ -99,9 +99,9 @@ export interface Configuration {
|
|
|
99
99
|
*/
|
|
100
100
|
traceExporter?: SpanExporterOrName;
|
|
101
101
|
spanLimits?: SpanLimits;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
views?:
|
|
102
|
+
logRecordProcessors?: LogRecordProcessor[];
|
|
103
|
+
metricReaders?: MetricReader[];
|
|
104
|
+
views?: ViewOptions[];
|
|
105
105
|
}
|
|
106
106
|
export type AttributesFromHeaderFunc = <Carrier = unknown>(headers: Carrier, getter: TextMapGetter<Carrier>) => Attributes | undefined;
|
|
107
107
|
export type AttributesFromHeaders = Record<string, string> | AttributesFromHeaderFunc;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/otel",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -47,23 +47,22 @@
|
|
|
47
47
|
"LICENSE"
|
|
48
48
|
],
|
|
49
49
|
"engines": {
|
|
50
|
-
"node": ">=
|
|
50
|
+
"node": "^18.19.0 || >=20.6.0"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@opentelemetry/api": "^1.
|
|
55
|
-
"@opentelemetry/api-logs": "^0.
|
|
56
|
-
"@opentelemetry/context-async-hooks": "^1.
|
|
57
|
-
"@opentelemetry/core": "^1.
|
|
58
|
-
"@opentelemetry/exporter-trace-otlp-http": "^0.
|
|
59
|
-
"@opentelemetry/instrumentation": "^0.
|
|
60
|
-
"@opentelemetry/otlp-exporter-base": "^0.
|
|
61
|
-
"@opentelemetry/otlp-
|
|
62
|
-
"@opentelemetry/
|
|
63
|
-
"@opentelemetry/
|
|
64
|
-
"@opentelemetry/sdk-
|
|
65
|
-
"@opentelemetry/sdk-
|
|
66
|
-
"@opentelemetry/sdk-trace-base": "^1.19.0",
|
|
54
|
+
"@opentelemetry/api": "^1.9.0",
|
|
55
|
+
"@opentelemetry/api-logs": "^0.205.0",
|
|
56
|
+
"@opentelemetry/context-async-hooks": "^2.1.0",
|
|
57
|
+
"@opentelemetry/core": "^2.1.0",
|
|
58
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.205.0",
|
|
59
|
+
"@opentelemetry/instrumentation": "^0.205.0",
|
|
60
|
+
"@opentelemetry/otlp-exporter-base": "^0.205.0",
|
|
61
|
+
"@opentelemetry/otlp-transformer": "^0.205.0",
|
|
62
|
+
"@opentelemetry/resources": "^2.1.0",
|
|
63
|
+
"@opentelemetry/sdk-logs": "^0.205.0",
|
|
64
|
+
"@opentelemetry/sdk-metrics": "^2.1.0",
|
|
65
|
+
"@opentelemetry/sdk-trace-base": "^2.1.0",
|
|
67
66
|
"@types/node": "18.15.11",
|
|
68
67
|
"esbuild": "^0.19.4",
|
|
69
68
|
"protobufjs": "^7.2.6",
|
|
@@ -76,13 +75,13 @@
|
|
|
76
75
|
"typescript-config": "1.0.0"
|
|
77
76
|
},
|
|
78
77
|
"peerDependencies": {
|
|
79
|
-
"@opentelemetry/api": ">=1.
|
|
80
|
-
"@opentelemetry/api-logs": ">=0.
|
|
81
|
-
"@opentelemetry/instrumentation": ">=0.
|
|
82
|
-
"@opentelemetry/resources": ">=
|
|
83
|
-
"@opentelemetry/sdk-logs": ">=0.
|
|
84
|
-
"@opentelemetry/sdk-metrics": ">=
|
|
85
|
-
"@opentelemetry/sdk-trace-base": ">=
|
|
78
|
+
"@opentelemetry/api": ">=1.9.0 <2.0.0",
|
|
79
|
+
"@opentelemetry/api-logs": ">=0.200.0 <0.300.0",
|
|
80
|
+
"@opentelemetry/instrumentation": ">=0.200.0 <0.300.0",
|
|
81
|
+
"@opentelemetry/resources": ">=2.0.0 <3.0.0",
|
|
82
|
+
"@opentelemetry/sdk-logs": ">=0.200.0 <0.300.0",
|
|
83
|
+
"@opentelemetry/sdk-metrics": ">=2.0.0 <3.0.0",
|
|
84
|
+
"@opentelemetry/sdk-trace-base": ">=2.0.0 <3.0.0"
|
|
86
85
|
},
|
|
87
86
|
"scripts": {
|
|
88
87
|
"build": "pnpm clean && pnpm tsx build.ts && pnpm build-types && pnpm build-site",
|