@zuplo/otel 6.52.7 → 6.52.12
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/out/types/index.d.ts +48 -46
- package/package.json +3 -3
package/out/types/index.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ReadableSpan } from
|
|
2
|
-
import { RequestHandlerProxy } from
|
|
3
|
-
import { Sampler } from
|
|
4
|
-
import { SpanExporter } from
|
|
5
|
-
import { SpanProcessor } from
|
|
6
|
-
import { TelemetryInitializationOptions } from
|
|
7
|
-
import { TelemetryPlugin } from
|
|
8
|
-
import { TextMapPropagator } from
|
|
1
|
+
import { ReadableSpan } from "@opentelemetry/sdk-trace-base";
|
|
2
|
+
import { RequestHandlerProxy } from "@zuplo/runtime";
|
|
3
|
+
import { Sampler } from "@opentelemetry/sdk-trace-base";
|
|
4
|
+
import { SpanExporter } from "@opentelemetry/sdk-trace-base";
|
|
5
|
+
import { SpanProcessor } from "@opentelemetry/sdk-trace-base";
|
|
6
|
+
import { TelemetryInitializationOptions } from "@zuplo/runtime";
|
|
7
|
+
import { TelemetryPlugin } from "@zuplo/runtime";
|
|
8
|
+
import { TextMapPropagator } from "@opentelemetry/api";
|
|
9
9
|
|
|
10
10
|
declare type AcceptTraceContextFn = (request: Request) => boolean;
|
|
11
11
|
|
|
12
12
|
declare type ExporterConfig = OTLPExporterConfig | SpanExporter;
|
|
13
13
|
|
|
14
14
|
declare interface FetcherConfig {
|
|
15
|
-
|
|
15
|
+
includeTraceContext?: boolean | IncludeTraceContextFn;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
declare interface FetchHandlerConfig {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Whether to enable context propagation for incoming requests to `fetch`.
|
|
21
|
+
* This enables or disables distributed tracing from W3C Trace Context headers.
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
acceptTraceContext?: boolean | AcceptTraceContextFn;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
declare interface HandlerConfig {
|
|
28
|
-
|
|
28
|
+
fetch?: FetchHandlerConfig;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
declare type HeadSamplerConf = Sampler | ParentRatioSamplingConfig;
|
|
@@ -33,14 +33,14 @@ declare type HeadSamplerConf = Sampler | ParentRatioSamplingConfig;
|
|
|
33
33
|
declare type IncludeTraceContextFn = (request: Request) => boolean;
|
|
34
34
|
|
|
35
35
|
declare interface InstrumentationOptions {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
instrumentGlobalFetch?: boolean;
|
|
37
|
+
instrumentGlobalCache?: boolean;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
declare interface LocalTrace {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
readonly traceId: string;
|
|
42
|
+
readonly localRootSpan: ReadableSpan;
|
|
43
|
+
readonly spans: ReadableSpan[];
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -102,34 +102,34 @@ declare interface LocalTrace {
|
|
|
102
102
|
* ```
|
|
103
103
|
*/
|
|
104
104
|
export declare class OpenTelemetryPlugin extends TelemetryPlugin {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
private config;
|
|
106
|
+
constructor(config: TraceConfig);
|
|
107
|
+
instrument(options: TelemetryInitializationOptions): {
|
|
108
|
+
requestHandlerProxy: RequestHandlerProxy;
|
|
109
|
+
};
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
declare interface OTLPExporterConfig {
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
url: string;
|
|
114
|
+
headers?: Record<string, string>;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
declare interface ParentRatioSamplingConfig {
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
acceptRemote?: boolean;
|
|
119
|
+
ratio: number;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
declare type PostProcessorFn = (spans: ReadableSpan[]) => ReadableSpan[];
|
|
123
123
|
|
|
124
124
|
declare interface SamplingConfig<HS extends HeadSamplerConf = HeadSamplerConf> {
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
headSampler?: HS;
|
|
126
|
+
tailSampler?: TailSampleFn;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
declare interface ServiceConfig {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
name: string;
|
|
131
|
+
namespace?: string;
|
|
132
|
+
version?: string;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
declare type TailSampleFn = (traceInfo: LocalTrace) => boolean;
|
|
@@ -171,20 +171,22 @@ declare type TailSampleFn = (traceInfo: LocalTrace) => boolean;
|
|
|
171
171
|
* };
|
|
172
172
|
* ```
|
|
173
173
|
*/
|
|
174
|
-
export declare type TraceConfig =
|
|
174
|
+
export declare type TraceConfig =
|
|
175
|
+
| TraceConfigExporter
|
|
176
|
+
| TraceConfigSpanProcessors;
|
|
175
177
|
|
|
176
178
|
/**
|
|
177
179
|
* Base configuration for OpenTelemetry tracing
|
|
178
180
|
* @public
|
|
179
181
|
*/
|
|
180
182
|
declare interface TraceConfigBase {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
183
|
+
service: ServiceConfig;
|
|
184
|
+
handlers?: HandlerConfig;
|
|
185
|
+
fetch?: FetcherConfig;
|
|
186
|
+
postProcessor?: PostProcessorFn;
|
|
187
|
+
sampling?: SamplingConfig;
|
|
188
|
+
propagator?: TextMapPropagator;
|
|
189
|
+
instrumentation?: InstrumentationOptions;
|
|
188
190
|
}
|
|
189
191
|
|
|
190
192
|
/**
|
|
@@ -192,7 +194,7 @@ declare interface TraceConfigBase {
|
|
|
192
194
|
* @public
|
|
193
195
|
*/
|
|
194
196
|
declare interface TraceConfigExporter extends TraceConfigBase {
|
|
195
|
-
|
|
197
|
+
exporter: ExporterConfig;
|
|
196
198
|
}
|
|
197
199
|
|
|
198
200
|
/**
|
|
@@ -200,7 +202,7 @@ declare interface TraceConfigExporter extends TraceConfigBase {
|
|
|
200
202
|
* @public
|
|
201
203
|
*/
|
|
202
204
|
declare interface TraceConfigSpanProcessors extends TraceConfigBase {
|
|
203
|
-
|
|
205
|
+
spanProcessors: SpanProcessor | SpanProcessor[];
|
|
204
206
|
}
|
|
205
207
|
|
|
206
|
-
export {
|
|
208
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/otel",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.52.
|
|
4
|
+
"version": "6.52.12",
|
|
5
5
|
"repository": "https://github.com/zuplo/zuplo",
|
|
6
6
|
"author": "Zuplo, Inc.",
|
|
7
7
|
"exports": {
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
"@opentelemetry/semantic-conventions": "1.34.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@zuplo/runtime": "6.52.
|
|
41
|
+
"@zuplo/runtime": "6.52.12"
|
|
42
42
|
}
|
|
43
|
-
}
|
|
43
|
+
}
|