1 | import { TextMapPropagator, Sampler } from '@opentelemetry/api';
|
2 | import { IdGenerator } from '@opentelemetry/core';
|
3 | import { ContextManager } from '@opentelemetry/api';
|
4 | import { Resource } from '@opentelemetry/resources';
|
5 | /**
|
6 | * TracerConfig provides an interface for configuring a Basic Tracer.
|
7 | */
|
8 | export interface TracerConfig {
|
9 | /**
|
10 | * Sampler determines if a span should be recorded or should be a NoopSpan.
|
11 | */
|
12 | sampler?: Sampler;
|
13 | /** Span Limits */
|
14 | spanLimits?: SpanLimits;
|
15 | /** Resource associated with trace telemetry */
|
16 | resource?: Resource;
|
17 | /**
|
18 | * Generator of trace and span IDs
|
19 | * The default idGenerator generates random ids
|
20 | */
|
21 | idGenerator?: IdGenerator;
|
22 | /**
|
23 | * How long the forceFlush can run before it is cancelled.
|
24 | * The default value is 30000ms
|
25 | */
|
26 | forceFlushTimeoutMillis?: number;
|
27 | }
|
28 | /**
|
29 | * Configuration options for registering the API with the SDK.
|
30 | * Undefined values may be substituted for defaults, and null
|
31 | * values will not be registered.
|
32 | */
|
33 | export interface SDKRegistrationConfig {
|
34 | /** Propagator to register as the global propagator */
|
35 | propagator?: TextMapPropagator | null;
|
36 | /** Context manager to register as the global context manager */
|
37 | contextManager?: ContextManager | null;
|
38 | }
|
39 | /** Global configuration of trace service */
|
40 | export interface SpanLimits {
|
41 | /** attributeCountLimit is number of attributes per span */
|
42 | attributeCountLimit?: number;
|
43 | /** linkCountLimit is number of links per span */
|
44 | linkCountLimit?: number;
|
45 | /** eventCountLimit is number of message events per span */
|
46 | eventCountLimit?: number;
|
47 | }
|
48 | /** Interface configuration for a buffer. */
|
49 | export interface BufferConfig {
|
50 | /** The maximum batch size of every export. It must be smaller or equal to
|
51 | * maxQueueSize. The default value is 512. */
|
52 | maxExportBatchSize?: number;
|
53 | /** The delay interval in milliseconds between two consecutive exports.
|
54 | * The default value is 5000ms. */
|
55 | scheduledDelayMillis?: number;
|
56 | /** How long the export can run before it is cancelled.
|
57 | * The default value is 30000ms */
|
58 | exportTimeoutMillis?: number;
|
59 | /** The maximum queue size. After the size is reached spans are dropped.
|
60 | * The default value is 2048. */
|
61 | maxQueueSize?: number;
|
62 | }
|
63 | /** Interface configuration for BatchSpanProcessor on browser */
|
64 | export interface BatchSpanProcessorBrowserConfig extends BufferConfig {
|
65 | /** Disable flush when a user navigates to a new page, closes the tab or the browser, or,
|
66 | * on mobile, switches to a different app. Auto flush is enabled by default. */
|
67 | disableAutoFlushOnDocumentHide?: boolean;
|
68 | }
|
69 | //# sourceMappingURL=types.d.ts.map |
\ | No newline at end of file |