@zuplo/otel 6.52.10 → 6.52.13

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,31 +1,31 @@
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';
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
- includeTraceContext?: boolean | IncludeTraceContextFn;
15
+ includeTraceContext?: boolean | IncludeTraceContextFn;
16
16
  }
17
17
 
18
18
  declare interface FetchHandlerConfig {
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;
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
- fetch?: FetchHandlerConfig;
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
- instrumentGlobalFetch?: boolean;
37
- instrumentGlobalCache?: boolean;
36
+ instrumentGlobalFetch?: boolean;
37
+ instrumentGlobalCache?: boolean;
38
38
  }
39
39
 
40
40
  declare interface LocalTrace {
41
- readonly traceId: string;
42
- readonly localRootSpan: ReadableSpan;
43
- readonly spans: ReadableSpan[];
41
+ readonly traceId: string;
42
+ readonly localRootSpan: ReadableSpan;
43
+ readonly spans: ReadableSpan[];
44
44
  }
45
45
 
46
46
  /**
@@ -102,42 +102,38 @@ declare interface LocalTrace {
102
102
  * ```
103
103
  */
104
104
  export declare class OpenTelemetryPlugin extends TelemetryPlugin {
105
- private config;
106
- constructor(config: TraceConfig);
107
- instrument(options: TelemetryInitializationOptions): {
108
- requestHandlerProxy: RequestHandlerProxy;
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
- url: string;
114
- headers?: Record<string, string>;
113
+ url: string;
114
+ headers?: Record<string, string>;
115
115
  }
116
116
 
117
117
  declare interface ParentRatioSamplingConfig {
118
- acceptRemote?: boolean;
119
- ratio: number;
118
+ acceptRemote?: boolean;
119
+ ratio: number;
120
120
  }
121
121
 
122
122
  declare type PostProcessorFn = (spans: ReadableSpan[]) => ReadableSpan[];
123
123
 
124
- /* Excluded from this release type: RequestHandlerProxy */
125
-
126
124
  declare interface SamplingConfig<HS extends HeadSamplerConf = HeadSamplerConf> {
127
- headSampler?: HS;
128
- tailSampler?: TailSampleFn;
125
+ headSampler?: HS;
126
+ tailSampler?: TailSampleFn;
129
127
  }
130
128
 
131
129
  declare interface ServiceConfig {
132
- name: string;
133
- namespace?: string;
134
- version?: string;
130
+ name: string;
131
+ namespace?: string;
132
+ version?: string;
135
133
  }
136
134
 
137
135
  declare type TailSampleFn = (traceInfo: LocalTrace) => boolean;
138
136
 
139
- /* Excluded from this release type: TelemetryInitializationOptions */
140
-
141
137
  /**
142
138
  * Configuration for OpenTelemetry tracing in Zuplo.
143
139
  * Can be configured with either an explicit exporter or custom span processors.
@@ -175,20 +171,22 @@ declare type TailSampleFn = (traceInfo: LocalTrace) => boolean;
175
171
  * };
176
172
  * ```
177
173
  */
178
- export declare type TraceConfig = TraceConfigExporter | TraceConfigSpanProcessors;
174
+ export declare type TraceConfig =
175
+ | TraceConfigExporter
176
+ | TraceConfigSpanProcessors;
179
177
 
180
178
  /**
181
179
  * Base configuration for OpenTelemetry tracing
182
180
  * @public
183
181
  */
184
182
  declare interface TraceConfigBase {
185
- service: ServiceConfig;
186
- handlers?: HandlerConfig;
187
- fetch?: FetcherConfig;
188
- postProcessor?: PostProcessorFn;
189
- sampling?: SamplingConfig;
190
- propagator?: TextMapPropagator;
191
- instrumentation?: InstrumentationOptions;
183
+ service: ServiceConfig;
184
+ handlers?: HandlerConfig;
185
+ fetch?: FetcherConfig;
186
+ postProcessor?: PostProcessorFn;
187
+ sampling?: SamplingConfig;
188
+ propagator?: TextMapPropagator;
189
+ instrumentation?: InstrumentationOptions;
192
190
  }
193
191
 
194
192
  /**
@@ -196,7 +194,7 @@ declare interface TraceConfigBase {
196
194
  * @public
197
195
  */
198
196
  declare interface TraceConfigExporter extends TraceConfigBase {
199
- exporter: ExporterConfig;
197
+ exporter: ExporterConfig;
200
198
  }
201
199
 
202
200
  /**
@@ -204,7 +202,7 @@ declare interface TraceConfigExporter extends TraceConfigBase {
204
202
  * @public
205
203
  */
206
204
  declare interface TraceConfigSpanProcessors extends TraceConfigBase {
207
- spanProcessors: SpanProcessor | SpanProcessor[];
205
+ spanProcessors: SpanProcessor | SpanProcessor[];
208
206
  }
209
207
 
210
- 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.10",
4
+ "version": "6.52.13",
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.10"
41
+ "@zuplo/runtime": "6.52.13"
42
42
  }
43
- }
43
+ }