@opentelemetry/configuration 0.215.0 → 0.217.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.
Files changed (44) hide show
  1. package/README.md +122 -13
  2. package/build/src/ConfigFactory.js +3 -1
  3. package/build/src/ConfigFactory.js.map +1 -1
  4. package/build/src/EnvironmentConfigFactory.d.ts +1 -1
  5. package/build/src/EnvironmentConfigFactory.js +195 -307
  6. package/build/src/EnvironmentConfigFactory.js.map +1 -1
  7. package/build/src/FileConfigFactory.d.ts +2 -17
  8. package/build/src/FileConfigFactory.js +269 -1054
  9. package/build/src/FileConfigFactory.js.map +1 -1
  10. package/build/src/IConfigFactory.d.ts +2 -2
  11. package/build/src/IConfigFactory.js.map +1 -1
  12. package/build/src/generated/types.d.ts +1652 -0
  13. package/build/src/generated/types.js +13 -0
  14. package/build/src/generated/types.js.map +1 -0
  15. package/build/src/generated/validator.d.ts +17 -0
  16. package/build/src/generated/validator.js +8412 -0
  17. package/build/src/generated/validator.js.map +1 -0
  18. package/build/src/index.d.ts +1 -4
  19. package/build/src/index.js.map +1 -1
  20. package/build/src/utils.d.ts +6 -66
  21. package/build/src/utils.js +68 -151
  22. package/build/src/utils.js.map +1 -1
  23. package/build/src/version.d.ts +1 -1
  24. package/build/src/version.js +1 -1
  25. package/build/src/version.js.map +1 -1
  26. package/package.json +6 -3
  27. package/build/src/models/commonModel.d.ts +0 -183
  28. package/build/src/models/commonModel.js +0 -40
  29. package/build/src/models/commonModel.js.map +0 -1
  30. package/build/src/models/configModel.d.ts +0 -77
  31. package/build/src/models/configModel.js +0 -21
  32. package/build/src/models/configModel.js.map +0 -1
  33. package/build/src/models/loggerProviderModel.d.ts +0 -134
  34. package/build/src/models/loggerProviderModel.js +0 -18
  35. package/build/src/models/loggerProviderModel.js.map +0 -1
  36. package/build/src/models/meterProviderModel.d.ts +0 -459
  37. package/build/src/models/meterProviderModel.js +0 -50
  38. package/build/src/models/meterProviderModel.js.map +0 -1
  39. package/build/src/models/resourceModel.d.ts +0 -72
  40. package/build/src/models/resourceModel.js +0 -7
  41. package/build/src/models/resourceModel.js.map +0 -1
  42. package/build/src/models/tracerProviderModel.d.ts +0 -256
  43. package/build/src/models/tracerProviderModel.js +0 -30
  44. package/build/src/models/tracerProviderModel.js.map +0 -1
@@ -1,256 +0,0 @@
1
- import type { ExperimentalOtlpFileExporter, OtlpGrpcExporter, OtlpHttpExporter } from './commonModel';
2
- export declare function initializeDefaultTracerProviderConfiguration(): Required<TracerProvider>;
3
- export interface TracerProvider {
4
- /**
5
- * Configure span processors.
6
- */
7
- processors: SpanProcessor[];
8
- /**
9
- * Configure span limits. See also attribute_limits.
10
- */
11
- limits?: SpanLimits;
12
- /**
13
- * Configure the sampler.
14
- * If omitted, parent based sampler with a root of always_on is used.
15
- */
16
- sampler?: Sampler;
17
- }
18
- export interface BatchSpanProcessor {
19
- /**
20
- * Configure delay interval (in milliseconds) between two consecutive exports.
21
- * Value must be non-negative.
22
- * If omitted or null, 5000 is used for traces and 1000 for logs.
23
- */
24
- schedule_delay?: number;
25
- /**
26
- * Configure maximum allowed time (in milliseconds) to export data.
27
- * Value must be non-negative. A value of 0 indicates no limit (infinity).
28
- * If omitted or null, 30000 is used.
29
- */
30
- export_timeout?: number;
31
- /**
32
- * Configure maximum queue size. Value must be positive.
33
- * If omitted or null, 2048 is used.
34
- */
35
- max_queue_size?: number;
36
- /**
37
- * Configure maximum batch size. Value must be positive.
38
- * If omitted or null, 512 is used.
39
- */
40
- max_export_batch_size?: number;
41
- /**
42
- * Configure exporter.
43
- */
44
- exporter: SpanExporter;
45
- }
46
- export interface Sampler {
47
- /**
48
- * Configure sampler to be parent_based.
49
- */
50
- parent_based?: ParentBasedSampler;
51
- /**
52
- * Configure sampler to be always_off.
53
- */
54
- always_off?: object;
55
- /**
56
- * Configure sampler to be always_on.
57
- */
58
- always_on?: object;
59
- /***
60
- * Configure sampler to be trace_id_ratio_based.
61
- */
62
- trace_id_ratio_based?: TraceIdRatioBasedSampler;
63
- /**
64
- * Configure sampler to be probability/development.
65
- */
66
- 'probability/development'?: ExperimentalProbabilitySampler;
67
- /**
68
- * Configure sampler to be composite/development.
69
- */
70
- 'composite/development'?: ExperimentalComposableSampler;
71
- }
72
- export interface ParentBasedSampler {
73
- /**
74
- * Configure root sampler.
75
- * If omitted or null, always_on is used.
76
- */
77
- root?: Sampler;
78
- /**
79
- * Configure remote_parent_sampled sampler.
80
- * If omitted or null, always_on is used.
81
- */
82
- remote_parent_sampled?: Sampler;
83
- /**
84
- * Configure remote_parent_not_sampled sampler.
85
- * If omitted or null, always_off is used.
86
- */
87
- remote_parent_not_sampled?: Sampler;
88
- /**
89
- * Configure local_parent_sampled sampler.
90
- * If omitted or null, always_on is used.
91
- */
92
- local_parent_sampled?: Sampler;
93
- /**
94
- * Configure local_parent_not_sampled sampler.
95
- * If omitted or null, always_off is used.
96
- */
97
- local_parent_not_sampled?: Sampler;
98
- }
99
- export interface TraceIdRatioBasedSampler {
100
- /**
101
- * Configure trace_id_ratio.
102
- * If omitted or null, 1.0 is used.
103
- */
104
- ratio?: number;
105
- }
106
- export interface ExperimentalProbabilitySampler {
107
- /**
108
- * Configure probability ratio.
109
- * If omitted or null, 1.0 is used.
110
- */
111
- ratio?: number;
112
- }
113
- export interface ExperimentalComposableSampler {
114
- /**
115
- * Configure composable sampler to be always_off.
116
- */
117
- always_off?: object;
118
- /**
119
- * Configure composable sampler to be always_on.
120
- */
121
- always_on?: object;
122
- /**
123
- * Configure composable sampler to be parent_threshold.
124
- */
125
- parent_threshold?: ExperimentalComposableParentThresholdSampler;
126
- /**
127
- * Configure composable sampler to be probability.
128
- */
129
- probability?: ExperimentalComposableProbabilitySampler;
130
- /**
131
- * Configure composable sampler to be rule_based.
132
- */
133
- rule_based?: ExperimentalComposableRuleBasedSampler;
134
- }
135
- export interface ExperimentalComposableParentThresholdSampler {
136
- /**
137
- * Sampler to use when there is no parent.
138
- */
139
- root: ExperimentalComposableSampler;
140
- }
141
- export interface ExperimentalComposableProbabilitySampler {
142
- /**
143
- * Configure probability ratio.
144
- * If omitted or null, 1.0 is used.
145
- */
146
- ratio?: number;
147
- }
148
- export interface ExperimentalComposableRuleBasedSampler {
149
- /**
150
- * The rules for the sampler, matched in order.
151
- */
152
- rules?: ExperimentalComposableRuleBasedSamplerRule[];
153
- }
154
- export interface ExperimentalComposableRuleBasedSamplerRule {
155
- /**
156
- * Values to match against a single attribute.
157
- */
158
- attribute_values?: {
159
- key: string;
160
- values: string[];
161
- };
162
- /**
163
- * Patterns to match against a single attribute.
164
- */
165
- attribute_patterns?: {
166
- key: string;
167
- included?: string[];
168
- excluded?: string[];
169
- };
170
- /**
171
- * The span kinds to match.
172
- */
173
- span_kinds?: string[];
174
- /**
175
- * The parent span types to match.
176
- */
177
- parent?: string[];
178
- /**
179
- * The sampler to use for matching spans.
180
- */
181
- sampler: ExperimentalComposableSampler;
182
- }
183
- export interface SimpleSpanProcessor {
184
- /**
185
- * Configure exporter.
186
- */
187
- exporter: SpanExporter;
188
- }
189
- export interface SpanExporter {
190
- /**
191
- * Configure exporter to be OTLP with HTTP transport.
192
- */
193
- otlp_http?: OtlpHttpExporter;
194
- /**
195
- * Configure exporter to be OTLP with gRPC transport.
196
- */
197
- otlp_grpc?: OtlpGrpcExporter;
198
- /**
199
- * Configure exporter to be OTLP with file transport.
200
- * This type is in development and subject to breaking changes in minor versions.
201
- */
202
- 'otlp_file/development'?: ExperimentalOtlpFileExporter;
203
- /**
204
- * Configure exporter to be console.
205
- */
206
- console?: object;
207
- }
208
- export interface SpanLimits {
209
- /**
210
- * Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit.
211
- * Value must be non-negative.
212
- * If omitted or null, there is no limit.
213
- */
214
- attribute_value_length_limit?: number;
215
- /**
216
- * Configure max attribute count. Overrides .attribute_limits.attribute_count_limit.
217
- * Value must be non-negative.
218
- * If omitted or null, 128 is used.
219
- */
220
- attribute_count_limit?: number;
221
- /**
222
- * Configure max span event count.
223
- * Value must be non-negative.
224
- * If omitted or null, 128 is used.
225
- */
226
- event_count_limit?: number;
227
- /**
228
- * Configure max span link count.
229
- * Value must be non-negative.
230
- * If omitted or null, 128 is used.
231
- */
232
- link_count_limit?: number;
233
- /**
234
- * Configure max attributes per span event.
235
- * Value must be non-negative.
236
- * If omitted or null, 128 is used.
237
- */
238
- event_attribute_count_limit?: number;
239
- /**
240
- * Configure max attributes per span link.
241
- * Value must be non-negative.
242
- * If omitted or null, 128 is used.
243
- */
244
- link_attribute_count_limit?: number;
245
- }
246
- export interface SpanProcessor {
247
- /**
248
- * Configure a batch span processor.
249
- */
250
- batch?: BatchSpanProcessor;
251
- /**
252
- * Configure a simple span processor.
253
- */
254
- simple?: SimpleSpanProcessor;
255
- }
256
- //# sourceMappingURL=tracerProviderModel.d.ts.map
@@ -1,30 +0,0 @@
1
- /*
2
- * Copyright The OpenTelemetry Authors
3
- * SPDX-License-Identifier: Apache-2.0
4
- */
5
- 'use strict';
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.initializeDefaultTracerProviderConfiguration = void 0;
8
- function initializeDefaultTracerProviderConfiguration() {
9
- return {
10
- processors: [],
11
- limits: {
12
- attribute_count_limit: 128,
13
- event_count_limit: 128,
14
- link_count_limit: 128,
15
- event_attribute_count_limit: 128,
16
- link_attribute_count_limit: 128,
17
- },
18
- sampler: {
19
- parent_based: {
20
- root: { always_on: undefined },
21
- remote_parent_sampled: { always_on: undefined },
22
- remote_parent_not_sampled: { always_off: undefined },
23
- local_parent_sampled: { always_on: undefined },
24
- local_parent_not_sampled: { always_off: undefined },
25
- },
26
- },
27
- };
28
- }
29
- exports.initializeDefaultTracerProviderConfiguration = initializeDefaultTracerProviderConfiguration;
30
- //# sourceMappingURL=tracerProviderModel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tracerProviderModel.js","sourceRoot":"","sources":["../../../src/models/tracerProviderModel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,YAAY,CAAC;;;AAQb,SAAgB,4CAA4C;IAC1D,OAAO;QACL,UAAU,EAAE,EAAE;QACd,MAAM,EAAE;YACN,qBAAqB,EAAE,GAAG;YAC1B,iBAAiB,EAAE,GAAG;YACtB,gBAAgB,EAAE,GAAG;YACrB,2BAA2B,EAAE,GAAG;YAChC,0BAA0B,EAAE,GAAG;SAChC;QACD,OAAO,EAAE;YACP,YAAY,EAAE;gBACZ,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE;gBAC9B,qBAAqB,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE;gBAC/C,yBAAyB,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;gBACpD,oBAAoB,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE;gBAC9C,wBAAwB,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;aACpD;SACF;KACF,CAAC;AACJ,CAAC;AApBD,oGAoBC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n'use strict';\n\nimport type {\n ExperimentalOtlpFileExporter,\n OtlpGrpcExporter,\n OtlpHttpExporter,\n} from './commonModel';\n\nexport function initializeDefaultTracerProviderConfiguration(): Required<TracerProvider> {\n return {\n processors: [],\n limits: {\n attribute_count_limit: 128,\n event_count_limit: 128,\n link_count_limit: 128,\n event_attribute_count_limit: 128,\n link_attribute_count_limit: 128,\n },\n sampler: {\n parent_based: {\n root: { always_on: undefined },\n remote_parent_sampled: { always_on: undefined },\n remote_parent_not_sampled: { always_off: undefined },\n local_parent_sampled: { always_on: undefined },\n local_parent_not_sampled: { always_off: undefined },\n },\n },\n };\n}\n\nexport interface TracerProvider {\n /**\n * Configure span processors.\n */\n processors: SpanProcessor[];\n\n /**\n * Configure span limits. See also attribute_limits.\n */\n limits?: SpanLimits;\n\n /**\n * Configure the sampler.\n * If omitted, parent based sampler with a root of always_on is used.\n */\n sampler?: Sampler;\n}\n\nexport interface BatchSpanProcessor {\n /**\n * Configure delay interval (in milliseconds) between two consecutive exports.\n * Value must be non-negative.\n * If omitted or null, 5000 is used for traces and 1000 for logs.\n */\n schedule_delay?: number;\n\n /**\n * Configure maximum allowed time (in milliseconds) to export data.\n * Value must be non-negative. A value of 0 indicates no limit (infinity).\n * If omitted or null, 30000 is used.\n */\n export_timeout?: number;\n\n /**\n * Configure maximum queue size. Value must be positive.\n * If omitted or null, 2048 is used.\n */\n max_queue_size?: number;\n\n /**\n * Configure maximum batch size. Value must be positive.\n * If omitted or null, 512 is used.\n */\n max_export_batch_size?: number;\n\n /**\n * Configure exporter.\n */\n exporter: SpanExporter;\n}\n\nexport interface Sampler {\n /**\n * Configure sampler to be parent_based.\n */\n parent_based?: ParentBasedSampler;\n\n /**\n * Configure sampler to be always_off.\n */\n always_off?: object;\n\n /**\n * Configure sampler to be always_on.\n */\n always_on?: object;\n\n /***\n * Configure sampler to be trace_id_ratio_based.\n */\n trace_id_ratio_based?: TraceIdRatioBasedSampler;\n\n /**\n * Configure sampler to be probability/development.\n */\n 'probability/development'?: ExperimentalProbabilitySampler;\n\n /**\n * Configure sampler to be composite/development.\n */\n 'composite/development'?: ExperimentalComposableSampler;\n}\n\nexport interface ParentBasedSampler {\n /**\n * Configure root sampler.\n * If omitted or null, always_on is used.\n */\n root?: Sampler;\n\n /**\n * Configure remote_parent_sampled sampler.\n * If omitted or null, always_on is used.\n */\n remote_parent_sampled?: Sampler;\n\n /**\n * Configure remote_parent_not_sampled sampler.\n * If omitted or null, always_off is used.\n */\n remote_parent_not_sampled?: Sampler;\n\n /**\n * Configure local_parent_sampled sampler.\n * If omitted or null, always_on is used.\n */\n local_parent_sampled?: Sampler;\n\n /**\n * Configure local_parent_not_sampled sampler.\n * If omitted or null, always_off is used.\n */\n local_parent_not_sampled?: Sampler;\n}\n\nexport interface TraceIdRatioBasedSampler {\n /**\n * Configure trace_id_ratio.\n * If omitted or null, 1.0 is used.\n */\n ratio?: number;\n}\n\nexport interface ExperimentalProbabilitySampler {\n /**\n * Configure probability ratio.\n * If omitted or null, 1.0 is used.\n */\n ratio?: number;\n}\n\nexport interface ExperimentalComposableSampler {\n /**\n * Configure composable sampler to be always_off.\n */\n always_off?: object;\n\n /**\n * Configure composable sampler to be always_on.\n */\n always_on?: object;\n\n /**\n * Configure composable sampler to be parent_threshold.\n */\n parent_threshold?: ExperimentalComposableParentThresholdSampler;\n\n /**\n * Configure composable sampler to be probability.\n */\n probability?: ExperimentalComposableProbabilitySampler;\n\n /**\n * Configure composable sampler to be rule_based.\n */\n rule_based?: ExperimentalComposableRuleBasedSampler;\n}\n\nexport interface ExperimentalComposableParentThresholdSampler {\n /**\n * Sampler to use when there is no parent.\n */\n root: ExperimentalComposableSampler;\n}\n\nexport interface ExperimentalComposableProbabilitySampler {\n /**\n * Configure probability ratio.\n * If omitted or null, 1.0 is used.\n */\n ratio?: number;\n}\n\nexport interface ExperimentalComposableRuleBasedSampler {\n /**\n * The rules for the sampler, matched in order.\n */\n rules?: ExperimentalComposableRuleBasedSamplerRule[];\n}\n\nexport interface ExperimentalComposableRuleBasedSamplerRule {\n /**\n * Values to match against a single attribute.\n */\n attribute_values?: {\n key: string;\n values: string[];\n };\n /**\n * Patterns to match against a single attribute.\n */\n attribute_patterns?: {\n key: string;\n included?: string[];\n excluded?: string[];\n };\n /**\n * The span kinds to match.\n */\n span_kinds?: string[];\n /**\n * The parent span types to match.\n */\n parent?: string[];\n /**\n * The sampler to use for matching spans.\n */\n sampler: ExperimentalComposableSampler;\n}\n\nexport interface SimpleSpanProcessor {\n /**\n * Configure exporter.\n */\n exporter: SpanExporter;\n}\n\nexport interface SpanExporter {\n /**\n * Configure exporter to be OTLP with HTTP transport.\n */\n otlp_http?: OtlpHttpExporter;\n\n /**\n * Configure exporter to be OTLP with gRPC transport.\n */\n otlp_grpc?: OtlpGrpcExporter;\n\n /**\n * Configure exporter to be OTLP with file transport.\n * This type is in development and subject to breaking changes in minor versions.\n */\n 'otlp_file/development'?: ExperimentalOtlpFileExporter;\n\n /**\n * Configure exporter to be console.\n */\n console?: object;\n}\n\nexport interface SpanLimits {\n /**\n * Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit.\n * Value must be non-negative.\n * If omitted or null, there is no limit.\n */\n attribute_value_length_limit?: number;\n\n /**\n * Configure max attribute count. Overrides .attribute_limits.attribute_count_limit.\n * Value must be non-negative.\n * If omitted or null, 128 is used.\n */\n attribute_count_limit?: number;\n\n /**\n * Configure max span event count.\n * Value must be non-negative.\n * If omitted or null, 128 is used.\n */\n event_count_limit?: number;\n\n /**\n * Configure max span link count.\n * Value must be non-negative.\n * If omitted or null, 128 is used.\n */\n link_count_limit?: number;\n\n /**\n * Configure max attributes per span event.\n * Value must be non-negative.\n * If omitted or null, 128 is used.\n */\n event_attribute_count_limit?: number;\n\n /**\n * Configure max attributes per span link.\n * Value must be non-negative.\n * If omitted or null, 128 is used.\n */\n link_attribute_count_limit?: number;\n}\n\nexport interface SpanProcessor {\n /**\n * Configure a batch span processor.\n */\n batch?: BatchSpanProcessor;\n\n /**\n * Configure a simple span processor.\n */\n simple?: SimpleSpanProcessor;\n}\n"]}