@opentelemetry/configuration 0.209.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/LICENSE +201 -0
- package/README.md +35 -0
- package/build/src/ConfigFactory.d.ts +3 -0
- package/build/src/ConfigFactory.js +28 -0
- package/build/src/ConfigFactory.js.map +1 -0
- package/build/src/EnvironmentConfigFactory.d.ts +17 -0
- package/build/src/EnvironmentConfigFactory.js +639 -0
- package/build/src/EnvironmentConfigFactory.js.map +1 -0
- package/build/src/FileConfigFactory.d.ts +21 -0
- package/build/src/FileConfigFactory.js +909 -0
- package/build/src/FileConfigFactory.js.map +1 -0
- package/build/src/IConfigFactory.d.ts +10 -0
- package/build/src/IConfigFactory.js +18 -0
- package/build/src/IConfigFactory.js.map +1 -0
- package/build/src/index.d.ts +7 -0
- package/build/src/index.js +21 -0
- package/build/src/index.js.map +1 -0
- package/build/src/models/commonModel.d.ts +145 -0
- package/build/src/models/commonModel.js +24 -0
- package/build/src/models/commonModel.js.map +1 -0
- package/build/src/models/configModel.d.ts +82 -0
- package/build/src/models/configModel.js +36 -0
- package/build/src/models/configModel.js.map +1 -0
- package/build/src/models/loggerProviderModel.d.ts +124 -0
- package/build/src/models/loggerProviderModel.js +28 -0
- package/build/src/models/loggerProviderModel.js.map +1 -0
- package/build/src/models/meterProviderModel.d.ts +470 -0
- package/build/src/models/meterProviderModel.js +53 -0
- package/build/src/models/meterProviderModel.js.map +1 -0
- package/build/src/models/resourceModel.d.ts +63 -0
- package/build/src/models/resourceModel.js +18 -0
- package/build/src/models/resourceModel.js.map +1 -0
- package/build/src/models/tracerProviderModel.d.ts +177 -0
- package/build/src/models/tracerProviderModel.js +41 -0
- package/build/src/models/tracerProviderModel.js.map +1 -0
- package/build/src/utils.d.ts +66 -0
- package/build/src/utils.js +174 -0
- package/build/src/utils.js.map +1 -0
- package/build/src/version.d.ts +2 -0
- package/build/src/version.js +21 -0
- package/build/src/version.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { OtlpFileExporter, OtlpGrpcExporter, OtlpHttpExporter } from './commonModel';
|
|
2
|
+
export declare function initializeDefaultLoggerProviderConfiguration(): LoggerProvider;
|
|
3
|
+
export interface LoggerProvider {
|
|
4
|
+
/**
|
|
5
|
+
* Configure log record processors.
|
|
6
|
+
*/
|
|
7
|
+
processors: LogRecordProcessor[];
|
|
8
|
+
/**
|
|
9
|
+
* Configure log record limits. See also attribute_limits.
|
|
10
|
+
*/
|
|
11
|
+
limits?: LogRecordLimits;
|
|
12
|
+
/**
|
|
13
|
+
* Configure loggers.
|
|
14
|
+
* This type is in development and subject to breaking changes in minor versions.
|
|
15
|
+
*/
|
|
16
|
+
'logger_configurator/development'?: LoggerConfigurator;
|
|
17
|
+
}
|
|
18
|
+
export interface SimpleLogRecordProcessor {
|
|
19
|
+
/**
|
|
20
|
+
* Configure exporter.
|
|
21
|
+
*/
|
|
22
|
+
exporter: LogRecordExporter;
|
|
23
|
+
}
|
|
24
|
+
export interface BatchLogRecordProcessor {
|
|
25
|
+
/**
|
|
26
|
+
* Configure delay interval (in milliseconds) between two consecutive exports.
|
|
27
|
+
* Value must be non-negative.
|
|
28
|
+
* If omitted or null, 1000 is used for traces and 1000 for logs.
|
|
29
|
+
*/
|
|
30
|
+
schedule_delay?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Configure maximum allowed time (in milliseconds) to export data.
|
|
33
|
+
* Value must be non-negative. A value of 0 indicates no limit (infinity).
|
|
34
|
+
* If omitted or null, 30000 is used.
|
|
35
|
+
*/
|
|
36
|
+
export_timeout?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Configure maximum queue size. Value must be positive.
|
|
39
|
+
* If omitted or null, 2048 is used.
|
|
40
|
+
*/
|
|
41
|
+
max_queue_size?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Configure maximum batch size. Value must be positive.
|
|
44
|
+
* If omitted or null, 512 is used.
|
|
45
|
+
*/
|
|
46
|
+
max_export_batch_size?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Configure exporter.
|
|
49
|
+
*/
|
|
50
|
+
exporter: LogRecordExporter;
|
|
51
|
+
}
|
|
52
|
+
export interface LogRecordExporter {
|
|
53
|
+
/**
|
|
54
|
+
* Configure exporter to be OTLP with HTTP transport.
|
|
55
|
+
*/
|
|
56
|
+
otlp_http?: OtlpHttpExporter;
|
|
57
|
+
/**
|
|
58
|
+
* Configure exporter to be OTLP with gRPC transport.
|
|
59
|
+
*/
|
|
60
|
+
otlp_grpc?: OtlpGrpcExporter;
|
|
61
|
+
/**
|
|
62
|
+
* Configure exporter to be OTLP with file transport.
|
|
63
|
+
* This type is in development and subject to breaking changes in minor versions.
|
|
64
|
+
*/
|
|
65
|
+
'otlp_file/development'?: OtlpFileExporter;
|
|
66
|
+
/**
|
|
67
|
+
* Configure exporter to be console.
|
|
68
|
+
*/
|
|
69
|
+
console?: object;
|
|
70
|
+
}
|
|
71
|
+
export interface LogRecordLimits {
|
|
72
|
+
/**
|
|
73
|
+
* Configure max attribute value size. Overrides .attribute_limits.attribute_value_length_limit.
|
|
74
|
+
* Value must be non-negative.
|
|
75
|
+
* If omitted or null, there is no limit.
|
|
76
|
+
*/
|
|
77
|
+
attribute_value_length_limit?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Configure max attribute count. Overrides .attribute_limits.attribute_count_limit.
|
|
80
|
+
* Value must be non-negative.
|
|
81
|
+
* If omitted or null, 128 is used.
|
|
82
|
+
*/
|
|
83
|
+
attribute_count_limit?: number;
|
|
84
|
+
}
|
|
85
|
+
export interface LogRecordProcessor {
|
|
86
|
+
/**
|
|
87
|
+
* Configure a batch log record processor.
|
|
88
|
+
*/
|
|
89
|
+
batch?: BatchLogRecordProcessor;
|
|
90
|
+
/**
|
|
91
|
+
* Configure a simple log record processor.
|
|
92
|
+
*/
|
|
93
|
+
simple?: SimpleLogRecordProcessor;
|
|
94
|
+
}
|
|
95
|
+
export interface LoggerConfigurator {
|
|
96
|
+
/**
|
|
97
|
+
* Configure the default logger config used there is no matching entry in .logger_configurator/development.loggers.
|
|
98
|
+
*/
|
|
99
|
+
default_config?: LoggerConfig;
|
|
100
|
+
/**
|
|
101
|
+
* Configure loggers.
|
|
102
|
+
*/
|
|
103
|
+
loggers?: LoggerMatcherAndConfig[];
|
|
104
|
+
}
|
|
105
|
+
export interface LoggerConfig {
|
|
106
|
+
/**
|
|
107
|
+
* Configure if the logger is enabled or not.
|
|
108
|
+
*/
|
|
109
|
+
disabled: boolean;
|
|
110
|
+
}
|
|
111
|
+
export interface LoggerMatcherAndConfig {
|
|
112
|
+
/**
|
|
113
|
+
* Configure logger names to match, evaluated as follows:
|
|
114
|
+
* * If the logger name exactly matches.
|
|
115
|
+
* * If the logger name matches the wildcard pattern, where '?' matches any single character
|
|
116
|
+
* and '*' matches any number of characters including none.
|
|
117
|
+
*/
|
|
118
|
+
name?: string;
|
|
119
|
+
/**
|
|
120
|
+
* The logger config.
|
|
121
|
+
*/
|
|
122
|
+
config?: LoggerConfig;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=loggerProviderModel.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright The OpenTelemetry Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
'use strict';
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.initializeDefaultLoggerProviderConfiguration = void 0;
|
|
19
|
+
function initializeDefaultLoggerProviderConfiguration() {
|
|
20
|
+
return {
|
|
21
|
+
processors: [],
|
|
22
|
+
limits: {
|
|
23
|
+
attribute_count_limit: 128,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.initializeDefaultLoggerProviderConfiguration = initializeDefaultLoggerProviderConfiguration;
|
|
28
|
+
//# sourceMappingURL=loggerProviderModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loggerProviderModel.js","sourceRoot":"","sources":["../../../src/models/loggerProviderModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,YAAY,CAAC;;;AAQb,SAAgB,4CAA4C;IAC1D,OAAO;QACL,UAAU,EAAE,EAAE;QACd,MAAM,EAAE;YACN,qBAAqB,EAAE,GAAG;SAC3B;KACF,CAAC;AACJ,CAAC;AAPD,oGAOC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use strict';\n\nimport {\n OtlpFileExporter,\n OtlpGrpcExporter,\n OtlpHttpExporter,\n} from './commonModel';\n\nexport function initializeDefaultLoggerProviderConfiguration(): LoggerProvider {\n return {\n processors: [],\n limits: {\n attribute_count_limit: 128,\n },\n };\n}\n\nexport interface LoggerProvider {\n /**\n * Configure log record processors.\n */\n processors: LogRecordProcessor[];\n\n /**\n * Configure log record limits. See also attribute_limits.\n */\n limits?: LogRecordLimits;\n\n /**\n * Configure loggers.\n * This type is in development and subject to breaking changes in minor versions.\n */\n 'logger_configurator/development'?: LoggerConfigurator;\n}\n\nexport interface SimpleLogRecordProcessor {\n /**\n * Configure exporter.\n */\n exporter: LogRecordExporter;\n}\n\nexport interface BatchLogRecordProcessor {\n /**\n * Configure delay interval (in milliseconds) between two consecutive exports.\n * Value must be non-negative.\n * If omitted or null, 1000 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: LogRecordExporter;\n}\n\nexport interface LogRecordExporter {\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'?: OtlpFileExporter;\n\n /**\n * Configure exporter to be console.\n */\n console?: object;\n}\n\nexport interface LogRecordLimits {\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\nexport interface LogRecordProcessor {\n /**\n * Configure a batch log record processor.\n */\n batch?: BatchLogRecordProcessor;\n\n /**\n * Configure a simple log record processor.\n */\n simple?: SimpleLogRecordProcessor;\n}\n\nexport interface LoggerConfigurator {\n /**\n * Configure the default logger config used there is no matching entry in .logger_configurator/development.loggers.\n */\n default_config?: LoggerConfig;\n\n /**\n * Configure loggers.\n */\n loggers?: LoggerMatcherAndConfig[];\n}\n\nexport interface LoggerConfig {\n /**\n * Configure if the logger is enabled or not.\n */\n disabled: boolean;\n}\n\nexport interface LoggerMatcherAndConfig {\n /**\n * Configure logger names to match, evaluated as follows:\n * * If the logger name exactly matches.\n * * If the logger name matches the wildcard pattern, where '?' matches any single character\n * and '*' matches any number of characters including none.\n */\n name?: string;\n\n /**\n * The logger config.\n */\n config?: LoggerConfig;\n}\n"]}
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
import { IncludeExclude, NameStringValuePair, OtlpHttpEncoding } from './commonModel';
|
|
2
|
+
export declare function initializeDefaultMeterProviderConfiguration(): MeterProvider;
|
|
3
|
+
export interface MeterProvider {
|
|
4
|
+
/**
|
|
5
|
+
* Configure metric readers.
|
|
6
|
+
*/
|
|
7
|
+
readers: MetricReader[];
|
|
8
|
+
/**
|
|
9
|
+
* Configure views.
|
|
10
|
+
* Each view has a selector which determines the instrument(s) it applies to,
|
|
11
|
+
* and a configuration for the resulting stream(s).
|
|
12
|
+
*/
|
|
13
|
+
views?: View[];
|
|
14
|
+
/**
|
|
15
|
+
* Configure the exemplar filter.
|
|
16
|
+
* Values include: trace_based, always_on, always_off.
|
|
17
|
+
* If omitted or null, trace_based is used.
|
|
18
|
+
*/
|
|
19
|
+
exemplar_filter?: ExemplarFilter;
|
|
20
|
+
}
|
|
21
|
+
export declare enum ExemplarFilter {
|
|
22
|
+
AlwaysOff = "always_off",
|
|
23
|
+
AlwaysOn = "always_on",
|
|
24
|
+
TraceBased = "trace_based"
|
|
25
|
+
}
|
|
26
|
+
export interface PeriodicMetricReader {
|
|
27
|
+
/**
|
|
28
|
+
* Configure delay interval (in milliseconds) between start of two consecutive exports.
|
|
29
|
+
* Value must be non-negative.
|
|
30
|
+
* If omitted or null, 60000 is used.
|
|
31
|
+
*/
|
|
32
|
+
interval?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Configure maximum allowed time (in milliseconds) to export data.
|
|
35
|
+
* Value must be non-negative. A value of 0 indicates no limit (infinity).
|
|
36
|
+
* If omitted or null, 30000 is used.
|
|
37
|
+
*/
|
|
38
|
+
timeout?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Configure exporter.
|
|
41
|
+
*/
|
|
42
|
+
exporter: PushMetricExporter;
|
|
43
|
+
/**
|
|
44
|
+
* Configure metric producers.
|
|
45
|
+
*/
|
|
46
|
+
producers?: MetricProducer[];
|
|
47
|
+
/**
|
|
48
|
+
* Configure cardinality limits.
|
|
49
|
+
*/
|
|
50
|
+
cardinality_limits?: CardinalityLimits;
|
|
51
|
+
}
|
|
52
|
+
export interface PullMetricReader {
|
|
53
|
+
/**
|
|
54
|
+
* Configure exporter.
|
|
55
|
+
*/
|
|
56
|
+
exporter: PullMetricExporter;
|
|
57
|
+
/**
|
|
58
|
+
* Configure metric producers.
|
|
59
|
+
*/
|
|
60
|
+
producers?: MetricProducer[];
|
|
61
|
+
/**
|
|
62
|
+
* Configure cardinality limits.
|
|
63
|
+
*/
|
|
64
|
+
cardinality_limits?: CardinalityLimits;
|
|
65
|
+
}
|
|
66
|
+
export interface CardinalityLimits {
|
|
67
|
+
/**
|
|
68
|
+
* Configure default cardinality limit for all instrument types.
|
|
69
|
+
* Instrument-specific cardinality limits take priority.
|
|
70
|
+
* If omitted or null, 2000 is used.
|
|
71
|
+
*/
|
|
72
|
+
default?: number;
|
|
73
|
+
/**
|
|
74
|
+
* Configure default cardinality limit for counter instruments.
|
|
75
|
+
* If omitted or null, the value from .default is used.
|
|
76
|
+
*/
|
|
77
|
+
counter?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Configure default cardinality limit for gauge instruments.
|
|
80
|
+
* If omitted or null, the value from .default is used.
|
|
81
|
+
*/
|
|
82
|
+
gauge?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Configure default cardinality limit for histogram instruments.
|
|
85
|
+
* If omitted or null, the value from .default is used.
|
|
86
|
+
*/
|
|
87
|
+
histogram?: number;
|
|
88
|
+
/**
|
|
89
|
+
* Configure default cardinality limit for observable_counter instruments.
|
|
90
|
+
* If omitted or null, the value from .default is used.
|
|
91
|
+
*/
|
|
92
|
+
observable_counter?: number;
|
|
93
|
+
/**
|
|
94
|
+
* Configure default cardinality limit for observable_gauge instruments.
|
|
95
|
+
* If omitted or null, the value from .default is used.
|
|
96
|
+
*/
|
|
97
|
+
observable_gauge?: number;
|
|
98
|
+
/**
|
|
99
|
+
* Configure default cardinality limit for observable_up_down_counter instruments.
|
|
100
|
+
* If omitted or null, the value from .default is used.
|
|
101
|
+
*/
|
|
102
|
+
observable_up_down_counter?: number;
|
|
103
|
+
/**
|
|
104
|
+
* Configure default cardinality limit for up_down_counter instruments.
|
|
105
|
+
* If omitted or null, the value from .default is used.
|
|
106
|
+
*/
|
|
107
|
+
up_down_counter?: number;
|
|
108
|
+
}
|
|
109
|
+
export interface PushMetricExporter {
|
|
110
|
+
/**
|
|
111
|
+
* Configure exporter to be OTLP with HTTP transport.
|
|
112
|
+
*/
|
|
113
|
+
otlp_http?: OtlpHttpMetricExporter;
|
|
114
|
+
/**
|
|
115
|
+
* Configure exporter to be OTLP with gRPC transport.
|
|
116
|
+
*/
|
|
117
|
+
otlp_grpc?: OtlpGrpcMetricExporter;
|
|
118
|
+
/**
|
|
119
|
+
* Configure exporter to be OTLP with file transport.
|
|
120
|
+
* This type is in development and subject to breaking changes in minor versions.
|
|
121
|
+
*/
|
|
122
|
+
'otlp_file/development'?: OtlpFileMetricExporter;
|
|
123
|
+
/**
|
|
124
|
+
* Configure exporter to be console.
|
|
125
|
+
*/
|
|
126
|
+
console?: object;
|
|
127
|
+
}
|
|
128
|
+
export interface PullMetricExporter {
|
|
129
|
+
/**
|
|
130
|
+
* Configure exporter to be prometheus.
|
|
131
|
+
* This type is in development and subject to breaking changes in minor versions.
|
|
132
|
+
*/
|
|
133
|
+
'prometheus/development': PrometheusMetricExporter;
|
|
134
|
+
}
|
|
135
|
+
export interface MetricProducer {
|
|
136
|
+
/**
|
|
137
|
+
* Configure metric producer to be opencensus.
|
|
138
|
+
*/
|
|
139
|
+
opencensus?: object;
|
|
140
|
+
/**
|
|
141
|
+
* Configure metric producer to be prometheus.
|
|
142
|
+
*/
|
|
143
|
+
prometheus?: object;
|
|
144
|
+
}
|
|
145
|
+
export interface PrometheusMetricExporter {
|
|
146
|
+
/**
|
|
147
|
+
* Configure host.
|
|
148
|
+
* If omitted or null, localhost is used.
|
|
149
|
+
*/
|
|
150
|
+
host?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Configure port.
|
|
153
|
+
* If omitted or null, 9464 is used.
|
|
154
|
+
*/
|
|
155
|
+
port?: number;
|
|
156
|
+
/**
|
|
157
|
+
* Configure Prometheus Exporter to produce metrics without a scope info metric.
|
|
158
|
+
* If omitted or null, false is used.
|
|
159
|
+
*/
|
|
160
|
+
without_scope_info?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Configure Prometheus Exporter to add resource attributes as metrics attributes.
|
|
163
|
+
*/
|
|
164
|
+
with_resource_constant_labels: IncludeExclude;
|
|
165
|
+
}
|
|
166
|
+
export interface MetricReader {
|
|
167
|
+
/**
|
|
168
|
+
* Configure a periodic metric reader.
|
|
169
|
+
*/
|
|
170
|
+
periodic?: PeriodicMetricReader;
|
|
171
|
+
/**
|
|
172
|
+
* Configure a pull based metric reader.
|
|
173
|
+
*/
|
|
174
|
+
pull?: PullMetricReader;
|
|
175
|
+
}
|
|
176
|
+
export interface OtlpHttpMetricExporter {
|
|
177
|
+
/**
|
|
178
|
+
* Configure endpoint, including the metric specific path.
|
|
179
|
+
* If omitted or null, http://localhost:4318/v1/metrics is used.
|
|
180
|
+
*/
|
|
181
|
+
endpoint?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Configure certificate used to verify a server's TLS credentials.
|
|
184
|
+
* Absolute path to certificate file in PEM format.
|
|
185
|
+
* If omitted or null, system default certificate verification is used for secure connections.
|
|
186
|
+
*/
|
|
187
|
+
certificate_file?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Configure mTLS private client key.
|
|
190
|
+
* Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
|
|
191
|
+
* If omitted or null, mTLS is not used.
|
|
192
|
+
*/
|
|
193
|
+
client_key_file?: string;
|
|
194
|
+
/**
|
|
195
|
+
* Configure mTLS client certificate.
|
|
196
|
+
* Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
|
|
197
|
+
* If omitted or null, mTLS is not used.
|
|
198
|
+
*/
|
|
199
|
+
client_certificate_file?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Configure headers. Entries have higher priority than entries from .headers_list.
|
|
202
|
+
* If an entry's .value is null, the entry is ignored.
|
|
203
|
+
*/
|
|
204
|
+
headers?: NameStringValuePair[];
|
|
205
|
+
/**
|
|
206
|
+
* Configure headers. Entries have lower priority than entries from .headers.
|
|
207
|
+
* The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS.
|
|
208
|
+
* If omitted or null, no headers are added.
|
|
209
|
+
*/
|
|
210
|
+
headers_list?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Configure compression.
|
|
213
|
+
* Values include: gzip, none. Implementations may support other compression algorithms.
|
|
214
|
+
* If omitted or null, none is used.
|
|
215
|
+
*/
|
|
216
|
+
compression?: string;
|
|
217
|
+
/**
|
|
218
|
+
* Configure max time (in milliseconds) to wait for each export.
|
|
219
|
+
* Value must be non-negative. A value of 0 indicates no limit (infinity).
|
|
220
|
+
* If omitted or null, 10000 is used.
|
|
221
|
+
*/
|
|
222
|
+
timeout?: number;
|
|
223
|
+
/**
|
|
224
|
+
* Configure the encoding used for messages.
|
|
225
|
+
* Values include: protobuf, json. Implementations may not support json.
|
|
226
|
+
* If omitted or null, protobuf is used.
|
|
227
|
+
*/
|
|
228
|
+
encoding?: OtlpHttpEncoding;
|
|
229
|
+
/**
|
|
230
|
+
* Configure temporality preference.
|
|
231
|
+
* Values include: cumulative, delta, low_memory.
|
|
232
|
+
* If omitted or null, cumulative is used.
|
|
233
|
+
*/
|
|
234
|
+
temporality_preference?: ExporterTemporalityPreference;
|
|
235
|
+
/**
|
|
236
|
+
* Configure default histogram aggregation.
|
|
237
|
+
* Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram.
|
|
238
|
+
* If omitted or null, explicit_bucket_histogram is used.
|
|
239
|
+
*/
|
|
240
|
+
default_histogram_aggregation?: ExporterDefaultHistogramAggregation;
|
|
241
|
+
}
|
|
242
|
+
export interface OtlpGrpcMetricExporter {
|
|
243
|
+
/**
|
|
244
|
+
* Configure endpoint.
|
|
245
|
+
* If omitted or null, http://localhost:4317 is used.
|
|
246
|
+
*/
|
|
247
|
+
endpoint?: string;
|
|
248
|
+
/**
|
|
249
|
+
* Configure certificate used to verify a server's TLS credentials.
|
|
250
|
+
* Absolute path to certificate file in PEM format.
|
|
251
|
+
* If omitted or null, system default certificate verification is used for secure connections.
|
|
252
|
+
*/
|
|
253
|
+
certificate_file?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Configure mTLS private client key.
|
|
256
|
+
* Absolute path to client key file in PEM format. If set, .client_certificate must also be set.
|
|
257
|
+
* If omitted or null, mTLS is not used.
|
|
258
|
+
*/
|
|
259
|
+
client_key_file?: string;
|
|
260
|
+
/**
|
|
261
|
+
* Configure mTLS client certificate.
|
|
262
|
+
* Absolute path to client certificate file in PEM format. If set, .client_key must also be set.
|
|
263
|
+
* If omitted or null, mTLS is not used.
|
|
264
|
+
*/
|
|
265
|
+
client_certificate_file?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Configure headers. Entries have higher priority than entries from .headers_list.
|
|
268
|
+
* If an entry's .value is null, the entry is ignored.
|
|
269
|
+
*/
|
|
270
|
+
headers?: NameStringValuePair[];
|
|
271
|
+
/**
|
|
272
|
+
* Configure headers. Entries have lower priority than entries from .headers.
|
|
273
|
+
* The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS.
|
|
274
|
+
* If omitted or null, no headers are added.
|
|
275
|
+
*/
|
|
276
|
+
headers_list?: string;
|
|
277
|
+
/**
|
|
278
|
+
* Configure compression.
|
|
279
|
+
* Values include: gzip, none. Implementations may support other compression algorithms.
|
|
280
|
+
* If omitted or null, none is used.
|
|
281
|
+
*/
|
|
282
|
+
compression?: string;
|
|
283
|
+
/**
|
|
284
|
+
* Configure max time (in milliseconds) to wait for each export.
|
|
285
|
+
* Value must be non-negative. A value of 0 indicates no limit (infinity).
|
|
286
|
+
* If omitted or null, 10000 is used.
|
|
287
|
+
*/
|
|
288
|
+
timeout?: number;
|
|
289
|
+
/**
|
|
290
|
+
* Configure client transport security for the exporter's connection.
|
|
291
|
+
* Only applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.
|
|
292
|
+
* If omitted or null, false is used.
|
|
293
|
+
*/
|
|
294
|
+
insecure?: boolean;
|
|
295
|
+
/**
|
|
296
|
+
* Configure temporality preference.
|
|
297
|
+
* Values include: cumulative, delta, low_memory.
|
|
298
|
+
* If omitted or null, cumulative is used.
|
|
299
|
+
*/
|
|
300
|
+
temporality_preference?: ExporterTemporalityPreference;
|
|
301
|
+
/**
|
|
302
|
+
* Configure default histogram aggregation.
|
|
303
|
+
* Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram.
|
|
304
|
+
* If omitted or null, explicit_bucket_histogram is used.
|
|
305
|
+
*/
|
|
306
|
+
default_histogram_aggregation?: ExporterDefaultHistogramAggregation;
|
|
307
|
+
}
|
|
308
|
+
export interface OtlpFileMetricExporter {
|
|
309
|
+
/**
|
|
310
|
+
* Configure output stream.
|
|
311
|
+
* Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl.
|
|
312
|
+
* If omitted or null, stdout is used.
|
|
313
|
+
*/
|
|
314
|
+
output_stream?: string;
|
|
315
|
+
/**
|
|
316
|
+
* Configure temporality preference.
|
|
317
|
+
* Values include: cumulative, delta, low_memory.
|
|
318
|
+
* If omitted or null, cumulative is used.
|
|
319
|
+
*/
|
|
320
|
+
temporality_preference?: ExporterTemporalityPreference;
|
|
321
|
+
/**
|
|
322
|
+
* Configure default histogram aggregation.
|
|
323
|
+
* Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram.
|
|
324
|
+
* If omitted or null, explicit_bucket_histogram is used.
|
|
325
|
+
*/
|
|
326
|
+
default_histogram_aggregation?: ExporterDefaultHistogramAggregation;
|
|
327
|
+
}
|
|
328
|
+
export declare enum ExporterTemporalityPreference {
|
|
329
|
+
Cumulative = "cumulative",
|
|
330
|
+
Delta = "delta",
|
|
331
|
+
LowMemory = "low_memory"
|
|
332
|
+
}
|
|
333
|
+
export declare enum ExporterDefaultHistogramAggregation {
|
|
334
|
+
Base2ExponentialBucketHistogram = "base2_exponential_bucket_histogram",
|
|
335
|
+
ExplicitBucketHistogram = "explicit_bucket_histogram"
|
|
336
|
+
}
|
|
337
|
+
export interface View {
|
|
338
|
+
/**
|
|
339
|
+
* Configure view selector.
|
|
340
|
+
*/
|
|
341
|
+
selector?: ViewSelector;
|
|
342
|
+
/**
|
|
343
|
+
* Configure view stream.
|
|
344
|
+
*/
|
|
345
|
+
stream?: ViewStream;
|
|
346
|
+
}
|
|
347
|
+
export interface ViewSelector {
|
|
348
|
+
/**
|
|
349
|
+
* Configure instrument name selection criteria.
|
|
350
|
+
* If omitted or null, all instrument names match.
|
|
351
|
+
*/
|
|
352
|
+
instrument_name?: string;
|
|
353
|
+
/**
|
|
354
|
+
* Configure instrument type selection criteria.
|
|
355
|
+
* Values include: counter, gauge, histogram, observable_counter, observable_gauge,
|
|
356
|
+
* observable_up_down_counter, up_down_counter.
|
|
357
|
+
* If omitted or null, all instrument types match.
|
|
358
|
+
*/
|
|
359
|
+
instrument_type?: InstrumentType;
|
|
360
|
+
/**
|
|
361
|
+
* Configure the instrument unit selection criteria.
|
|
362
|
+
* If omitted or null, all instrument units match.
|
|
363
|
+
*/
|
|
364
|
+
unit?: string;
|
|
365
|
+
/**
|
|
366
|
+
* Configure meter name selection criteria.
|
|
367
|
+
* If omitted or null, all meter names match.
|
|
368
|
+
*/
|
|
369
|
+
meter_name?: string;
|
|
370
|
+
/**
|
|
371
|
+
* Configure meter version selection criteria.
|
|
372
|
+
* If omitted or null, all meter versions match.
|
|
373
|
+
*/
|
|
374
|
+
meter_version?: string;
|
|
375
|
+
/**
|
|
376
|
+
* Configure meter schema url selection criteria.
|
|
377
|
+
* If omitted or null, all meter schema URLs match.
|
|
378
|
+
*/
|
|
379
|
+
meter_schema_url?: string;
|
|
380
|
+
}
|
|
381
|
+
export declare enum InstrumentType {
|
|
382
|
+
Counter = "counter",
|
|
383
|
+
Gauge = "gauge",
|
|
384
|
+
Histogram = "histogram",
|
|
385
|
+
ObservableCounter = "observable_counter",
|
|
386
|
+
ObservableGauge = "observable_gauge",
|
|
387
|
+
ObservableUpDownCounter = "observable_up_down_counter",
|
|
388
|
+
UpDownCounter = "up_down_counter"
|
|
389
|
+
}
|
|
390
|
+
export interface ViewStream {
|
|
391
|
+
/**
|
|
392
|
+
* Configure metric name of the resulting stream(s).
|
|
393
|
+
* If omitted or null, the instrument's original name is used.
|
|
394
|
+
*/
|
|
395
|
+
name?: string;
|
|
396
|
+
/**
|
|
397
|
+
* Configure metric description of the resulting stream(s).
|
|
398
|
+
* If omitted or null, the instrument's origin description is used.
|
|
399
|
+
*/
|
|
400
|
+
description?: string;
|
|
401
|
+
/**
|
|
402
|
+
* Configure aggregation of the resulting stream(s).
|
|
403
|
+
* Values include: default, drop, explicit_bucket_histogram, base2_exponential_bucket_histogram, last_value, sum.
|
|
404
|
+
* If omitted, default is used.
|
|
405
|
+
*/
|
|
406
|
+
aggregation?: Aggregation;
|
|
407
|
+
/**
|
|
408
|
+
* Configure the aggregation cardinality limit.
|
|
409
|
+
* If omitted or null, the metric reader's default cardinality limit is used.
|
|
410
|
+
*/
|
|
411
|
+
aggregation_cardinality_limit?: number;
|
|
412
|
+
/**
|
|
413
|
+
* Configure attribute keys retained in the resulting stream(s).
|
|
414
|
+
*/
|
|
415
|
+
attribute_keys?: IncludeExclude;
|
|
416
|
+
}
|
|
417
|
+
export interface Aggregation {
|
|
418
|
+
/**
|
|
419
|
+
* Configure aggregation to be default.
|
|
420
|
+
*/
|
|
421
|
+
default?: object;
|
|
422
|
+
/**
|
|
423
|
+
* Configure aggregation to be drop.
|
|
424
|
+
*/
|
|
425
|
+
drop?: object;
|
|
426
|
+
/**
|
|
427
|
+
* Configure aggregation to be explicit_bucket_histogram.
|
|
428
|
+
*/
|
|
429
|
+
explicit_bucket_histogram?: ExplicitBucketHistogramAggregation;
|
|
430
|
+
/**
|
|
431
|
+
* Configure aggregation to be base2_exponential_bucket_histogram.
|
|
432
|
+
*/
|
|
433
|
+
base2_exponential_bucket_histogram?: Base2ExponentialBucketHistogramAggregation;
|
|
434
|
+
/**
|
|
435
|
+
* Configure aggregation to be last_value.
|
|
436
|
+
*/
|
|
437
|
+
last_value?: object;
|
|
438
|
+
/**
|
|
439
|
+
* Configure aggregation to be sum.
|
|
440
|
+
*/
|
|
441
|
+
sum?: object;
|
|
442
|
+
}
|
|
443
|
+
export interface ExplicitBucketHistogramAggregation {
|
|
444
|
+
/**
|
|
445
|
+
* Configure bucket boundaries.
|
|
446
|
+
* If omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000] is used.
|
|
447
|
+
*/
|
|
448
|
+
boundaries?: number[];
|
|
449
|
+
/**
|
|
450
|
+
* Configure record min and max.
|
|
451
|
+
* If omitted or null, true is used.
|
|
452
|
+
*/
|
|
453
|
+
record_min_max?: boolean;
|
|
454
|
+
}
|
|
455
|
+
export interface Base2ExponentialBucketHistogramAggregation {
|
|
456
|
+
/**
|
|
457
|
+
* Configure max_scale.
|
|
458
|
+
*/
|
|
459
|
+
max_scale?: number;
|
|
460
|
+
/**
|
|
461
|
+
* Configure max_size.
|
|
462
|
+
*/
|
|
463
|
+
max_size?: number;
|
|
464
|
+
/**
|
|
465
|
+
* Configure record min and max.
|
|
466
|
+
* If omitted or null, true is used.
|
|
467
|
+
*/
|
|
468
|
+
record_min_max?: boolean;
|
|
469
|
+
}
|
|
470
|
+
//# sourceMappingURL=meterProviderModel.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright The OpenTelemetry Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
'use strict';
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.InstrumentType = exports.ExporterDefaultHistogramAggregation = exports.ExporterTemporalityPreference = exports.ExemplarFilter = exports.initializeDefaultMeterProviderConfiguration = void 0;
|
|
19
|
+
function initializeDefaultMeterProviderConfiguration() {
|
|
20
|
+
return {
|
|
21
|
+
readers: [],
|
|
22
|
+
exemplar_filter: ExemplarFilter.TraceBased,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
exports.initializeDefaultMeterProviderConfiguration = initializeDefaultMeterProviderConfiguration;
|
|
26
|
+
var ExemplarFilter;
|
|
27
|
+
(function (ExemplarFilter) {
|
|
28
|
+
ExemplarFilter["AlwaysOff"] = "always_off";
|
|
29
|
+
ExemplarFilter["AlwaysOn"] = "always_on";
|
|
30
|
+
ExemplarFilter["TraceBased"] = "trace_based";
|
|
31
|
+
})(ExemplarFilter = exports.ExemplarFilter || (exports.ExemplarFilter = {}));
|
|
32
|
+
var ExporterTemporalityPreference;
|
|
33
|
+
(function (ExporterTemporalityPreference) {
|
|
34
|
+
ExporterTemporalityPreference["Cumulative"] = "cumulative";
|
|
35
|
+
ExporterTemporalityPreference["Delta"] = "delta";
|
|
36
|
+
ExporterTemporalityPreference["LowMemory"] = "low_memory";
|
|
37
|
+
})(ExporterTemporalityPreference = exports.ExporterTemporalityPreference || (exports.ExporterTemporalityPreference = {}));
|
|
38
|
+
var ExporterDefaultHistogramAggregation;
|
|
39
|
+
(function (ExporterDefaultHistogramAggregation) {
|
|
40
|
+
ExporterDefaultHistogramAggregation["Base2ExponentialBucketHistogram"] = "base2_exponential_bucket_histogram";
|
|
41
|
+
ExporterDefaultHistogramAggregation["ExplicitBucketHistogram"] = "explicit_bucket_histogram";
|
|
42
|
+
})(ExporterDefaultHistogramAggregation = exports.ExporterDefaultHistogramAggregation || (exports.ExporterDefaultHistogramAggregation = {}));
|
|
43
|
+
var InstrumentType;
|
|
44
|
+
(function (InstrumentType) {
|
|
45
|
+
InstrumentType["Counter"] = "counter";
|
|
46
|
+
InstrumentType["Gauge"] = "gauge";
|
|
47
|
+
InstrumentType["Histogram"] = "histogram";
|
|
48
|
+
InstrumentType["ObservableCounter"] = "observable_counter";
|
|
49
|
+
InstrumentType["ObservableGauge"] = "observable_gauge";
|
|
50
|
+
InstrumentType["ObservableUpDownCounter"] = "observable_up_down_counter";
|
|
51
|
+
InstrumentType["UpDownCounter"] = "up_down_counter";
|
|
52
|
+
})(InstrumentType = exports.InstrumentType || (exports.InstrumentType = {}));
|
|
53
|
+
//# sourceMappingURL=meterProviderModel.js.map
|