@opentelemetry/configuration 0.216.0 → 0.218.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/README.md +122 -13
- package/build/src/ConfigFactory.js +3 -1
- package/build/src/ConfigFactory.js.map +1 -1
- package/build/src/EnvironmentConfigFactory.d.ts +1 -1
- package/build/src/EnvironmentConfigFactory.js +195 -307
- package/build/src/EnvironmentConfigFactory.js.map +1 -1
- package/build/src/FileConfigFactory.d.ts +2 -17
- package/build/src/FileConfigFactory.js +281 -1054
- package/build/src/FileConfigFactory.js.map +1 -1
- package/build/src/IConfigFactory.d.ts +2 -2
- package/build/src/IConfigFactory.js.map +1 -1
- package/build/src/generated/types.d.ts +1652 -0
- package/build/src/generated/types.js +13 -0
- package/build/src/generated/types.js.map +1 -0
- package/build/src/generated/validator.d.ts +17 -0
- package/build/src/generated/validator.js +8413 -0
- package/build/src/generated/validator.js.map +1 -0
- package/build/src/index.d.ts +1 -5
- package/build/src/index.js.map +1 -1
- package/build/src/utils.d.ts +6 -66
- package/build/src/utils.js +68 -151
- package/build/src/utils.js.map +1 -1
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/build/src/version.js.map +1 -1
- package/package.json +5 -2
- package/build/src/models/commonModel.d.ts +0 -183
- package/build/src/models/commonModel.js +0 -40
- package/build/src/models/commonModel.js.map +0 -1
- package/build/src/models/configModel.d.ts +0 -77
- package/build/src/models/configModel.js +0 -21
- package/build/src/models/configModel.js.map +0 -1
- package/build/src/models/loggerProviderModel.d.ts +0 -134
- package/build/src/models/loggerProviderModel.js +0 -18
- package/build/src/models/loggerProviderModel.js.map +0 -1
- package/build/src/models/meterProviderModel.d.ts +0 -459
- package/build/src/models/meterProviderModel.js +0 -50
- package/build/src/models/meterProviderModel.js.map +0 -1
- package/build/src/models/resourceModel.d.ts +0 -72
- package/build/src/models/resourceModel.js +0 -7
- package/build/src/models/resourceModel.js.map +0 -1
- package/build/src/models/tracerProviderModel.d.ts +0 -256
- package/build/src/models/tracerProviderModel.js +0 -30
- package/build/src/models/tracerProviderModel.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commonModel.js","sourceRoot":"","sources":["../../../src/models/commonModel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,YAAY,CAAC;;;AA4Eb,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B;AAwGD,IAAY,cAyBX;AAzBD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,iCAAe,CAAA;IACf,iCAAe,CAAA;IACf,iCAAe,CAAA;AACjB,CAAC,EAzBW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAyBzB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n'use strict';\n\nexport interface IncludeExclude {\n /**\n * Configure list of attribute key patterns to include from resource detectors.\n * Attribute keys from resource detectors are evaluated to match as follows:\n * * If the value of the attribute key exactly matches.\n * * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\n * If omitted, all attributes are included.\n */\n included?: string[];\n\n /**\n * Configure list of attribute key patterns to exclude from resource detectors. Applies after .resource.detectors.attributes.included (i.e. excluded has higher priority than included).\n * Attribute keys from resource detectors are evaluated to match as follows:\n * * If the value of the attribute key exactly matches.\n * * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.\n * If omitted, .included attributes are included.\n */\n excluded?: string[];\n}\n\nexport interface NameStringValuePair {\n name: string;\n value: string;\n}\n\nexport interface OtlpHttpExporter {\n /**\n * Configure endpoint, including the trace, metric or log specific path.\n * If omitted or null, http://localhost:4318/v1/traces is used for trace,\n * http://localhost:4318/v1/metrics for metrics\n * and http://localhost:4318/v1/logs is used for logs.\n */\n endpoint?: string;\n\n /**\n * Configure TLS settings for the exporter.\n */\n tls?: HttpTls;\n\n /**\n * Configure compression.\n * Values include: gzip, none. Implementations may support other compression algorithms.\n * If omitted or null, none is used.\n */\n compression?: string;\n\n /**\n * Configure max time (in milliseconds) to wait for each export.\n * Value must be non-negative. A value of 0 indicates no limit (infinity).\n * If omitted or null, 10000 is used.\n */\n timeout?: number;\n\n /**\n * Configure headers. Entries have higher priority than entries from .headers_list.\n * If an entry's .value is null, the entry is ignored.\n */\n headers?: NameStringValuePair[];\n\n /**\n * Configure headers. Entries have lower priority than entries from .headers.\n * The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS.\n * If omitted or null, no headers are added.\n */\n headers_list?: string;\n\n /**\n * Configure the encoding used for messages.\n * Values include: protobuf, json. Implementations may not support json.\n * If omitted or null, protobuf is used.\n */\n encoding?: OtlpHttpEncoding;\n}\n\nexport enum OtlpHttpEncoding {\n JSON = 'json',\n Protobuf = 'protobuf',\n}\n\nexport interface OtlpGrpcExporter {\n /**\n * Configure endpoint.\n * If omitted or null, http://localhost:4317 is used.\n */\n endpoint?: string;\n\n /**\n * Configure TLS settings for the exporter.\n */\n tls?: GrpcTls;\n\n /**\n * Configure headers. Entries have higher priority than entries from .headers_list.\n * If an entry's .value is null, the entry is ignored.\n */\n headers?: NameStringValuePair[];\n\n /**\n * Configure headers. Entries have lower priority than entries from .headers.\n * The value is a list of comma separated key-value pairs matching the format of OTEL_EXPORTER_OTLP_HEADERS.\n * If omitted or null, no headers are added.\n */\n headers_list?: string;\n\n /**\n * Configure compression.\n * Values include: gzip, none. Implementations may support other compression algorithms.\n * If omitted or null, none is used.\n */\n compression?: string;\n\n /**\n * Configure max time (in milliseconds) to wait for each export.\n * Value must be non-negative. A value of 0 indicates no limit (infinity).\n * If omitted or null, 10000 is used.\n */\n timeout?: number;\n}\n\nexport interface ExperimentalOtlpFileExporter {\n /**\n * Configure output stream.\n * Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl.\n * If omitted or null, stdout is used.\n */\n output_stream?: string;\n}\n\nexport interface HttpTls {\n /**\n * Configure certificate used to verify a server's TLS credentials.\n * Absolute path to certificate file in PEM format.\n * If omitted or null, system default certificate verification is used for secure connections.\n */\n ca_file?: string;\n\n /**\n * Configure mTLS private client key.\n * Absolute path to client key file in PEM format. If set, .client_certificate must also be set.\n * If omitted or null, mTLS is not used.\n */\n key_file?: string;\n\n /**\n * Configure mTLS client certificate.\n * Absolute path to client certificate file in PEM format. If set, .client_key must also be set.\n * If omitted or null, mTLS is not used.\n */\n cert_file?: string;\n}\n\nexport interface GrpcTls {\n /**\n * Configure certificate used to verify a server's TLS credentials.\n * Absolute path to certificate file in PEM format.\n * If omitted or null, system default certificate verification is used for secure connections.\n */\n ca_file?: string;\n\n /**\n * Configure mTLS private client key.\n * Absolute path to client key file in PEM format. If set, .client_certificate must also be set.\n * If omitted or null, mTLS is not used.\n */\n key_file?: string;\n\n /**\n * Configure mTLS client certificate.\n * Absolute path to client certificate file in PEM format. If set, .client_key must also be set.\n * If omitted or null, mTLS is not used.\n */\n cert_file?: string;\n\n /**\n * Configure client transport security for the exporter's connection.\n * Only applicable when .endpoint is provided without http or https scheme. Implementations may choose to ignore .insecure.\n * If omitted or null, false is used.\n */\n insecure?: boolean;\n}\n\nexport enum SeverityNumber {\n DEBUG = 'debug',\n DEBUG2 = 'debug2',\n DEBUG3 = 'debug3',\n DEBUG4 = 'debug4',\n ERROR = 'error',\n ERROR2 = 'error2',\n ERROR3 = 'error3',\n ERROR4 = 'error4',\n FATAL = 'fatal',\n FATAL2 = 'fatal2',\n FATAL3 = 'fatal3',\n FATAL4 = 'fatal4',\n INFO = 'info',\n INFO2 = 'info2',\n INFO3 = 'info3',\n INFO4 = 'info4',\n TRACE = 'trace',\n TRACE2 = 'trace2',\n TRACE3 = 'trace3',\n TRACE4 = 'trace4',\n WARN = 'warn',\n WARN2 = 'warn2',\n WARN3 = 'warn3',\n WARN4 = 'warn4',\n}\n"]}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type { TracerProvider } from './tracerProviderModel';
|
|
2
|
-
import type { LoggerProvider } from './loggerProviderModel';
|
|
3
|
-
import type { Resource } from './resourceModel';
|
|
4
|
-
import type { MeterProvider } from './meterProviderModel';
|
|
5
|
-
export interface ConfigurationModel {
|
|
6
|
-
/**
|
|
7
|
-
* Configure if the SDK is disabled or not.
|
|
8
|
-
* If omitted or null, false is used.
|
|
9
|
-
*/
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Configure the log level of the internal logger used by the SDK.
|
|
13
|
-
* If omitted, info is used.
|
|
14
|
-
*/
|
|
15
|
-
log_level?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Configure resource for all signals.
|
|
18
|
-
* If omitted, the default resource is used.
|
|
19
|
-
*/
|
|
20
|
-
resource?: Resource;
|
|
21
|
-
/**
|
|
22
|
-
* Configure general attribute limits.
|
|
23
|
-
* See also tracer_provider.limits, logger_provider.limits.
|
|
24
|
-
*/
|
|
25
|
-
attribute_limits?: AttributeLimits;
|
|
26
|
-
/**
|
|
27
|
-
* Configure text map context propagators.
|
|
28
|
-
*/
|
|
29
|
-
propagator?: Propagator;
|
|
30
|
-
/**
|
|
31
|
-
* Configure tracer provider.
|
|
32
|
-
*/
|
|
33
|
-
tracer_provider?: TracerProvider;
|
|
34
|
-
/**
|
|
35
|
-
* Configure meter provider.
|
|
36
|
-
*/
|
|
37
|
-
meter_provider?: MeterProvider;
|
|
38
|
-
/**
|
|
39
|
-
* Configure logger provider.
|
|
40
|
-
*/
|
|
41
|
-
logger_provider?: LoggerProvider;
|
|
42
|
-
}
|
|
43
|
-
export declare function initializeDefaultConfiguration(): ConfigurationModel;
|
|
44
|
-
export interface AttributeLimits {
|
|
45
|
-
/**
|
|
46
|
-
* Configure max attribute value size.
|
|
47
|
-
* Value must be non-negative.
|
|
48
|
-
* If omitted or null, there is no limit.
|
|
49
|
-
*/
|
|
50
|
-
attribute_value_length_limit?: number;
|
|
51
|
-
/**
|
|
52
|
-
* Configure max attribute count.
|
|
53
|
-
* Value must be non-negative.
|
|
54
|
-
* If omitted or null, 128 is used.
|
|
55
|
-
*/
|
|
56
|
-
attribute_count_limit: number;
|
|
57
|
-
}
|
|
58
|
-
export interface Propagator {
|
|
59
|
-
/**
|
|
60
|
-
* Configure the propagators in the composite text map propagator.
|
|
61
|
-
* Entries from .composite_list are appended to the list here with duplicates filtered out.
|
|
62
|
-
* Built-in propagator keys include: tracecontext, baggage, b3, b3multi, jaeger, ottrace.
|
|
63
|
-
* Known third party keys include: xray.
|
|
64
|
-
* If the resolved list of propagators (from .composite and .composite_list) is empty, a noop propagator is used.
|
|
65
|
-
*/
|
|
66
|
-
composite?: object[];
|
|
67
|
-
/**
|
|
68
|
-
* Configure the propagators in the composite text map propagator.
|
|
69
|
-
* Entries are appended to .composite with duplicates filtered out.
|
|
70
|
-
* The value is a comma separated list of propagator identifiers matching the format of OTEL_PROPAGATORS.
|
|
71
|
-
* Built-in propagator identifiers include: tracecontext, baggage, b3, b3multi, jaeger, ottrace.
|
|
72
|
-
* Known third party identifiers include: xray.
|
|
73
|
-
* If the resolved list of propagators (from .composite and .composite_list) is empty, a noop propagator is used.
|
|
74
|
-
*/
|
|
75
|
-
composite_list?: string;
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=configModel.d.ts.map
|
|
@@ -1,21 +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.initializeDefaultConfiguration = void 0;
|
|
8
|
-
const api_1 = require("@opentelemetry/api");
|
|
9
|
-
function initializeDefaultConfiguration() {
|
|
10
|
-
const config = {
|
|
11
|
-
disabled: false,
|
|
12
|
-
log_level: api_1.DiagLogLevel.INFO,
|
|
13
|
-
resource: {},
|
|
14
|
-
attribute_limits: {
|
|
15
|
-
attribute_count_limit: 128,
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
return config;
|
|
19
|
-
}
|
|
20
|
-
exports.initializeDefaultConfiguration = initializeDefaultConfiguration;
|
|
21
|
-
//# sourceMappingURL=configModel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configModel.js","sourceRoot":"","sources":["../../../src/models/configModel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,YAAY,CAAC;;;AAEb,4CAAkD;AAoDlD,SAAgB,8BAA8B;IAC5C,MAAM,MAAM,GAAuB;QACjC,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,kBAAY,CAAC,IAAI;QAC5B,QAAQ,EAAE,EAAE;QACZ,gBAAgB,EAAE;YAChB,qBAAqB,EAAE,GAAG;SAC3B;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAXD,wEAWC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n'use strict';\n\nimport { DiagLogLevel } from '@opentelemetry/api';\nimport type { TracerProvider } from './tracerProviderModel';\nimport type { LoggerProvider } from './loggerProviderModel';\nimport type { Resource } from './resourceModel';\nimport type { MeterProvider } from './meterProviderModel';\n\nexport interface ConfigurationModel {\n /**\n * Configure if the SDK is disabled or not.\n * If omitted or null, false is used.\n */\n disabled?: boolean;\n\n /**\n * Configure the log level of the internal logger used by the SDK.\n * If omitted, info is used.\n */\n log_level?: number;\n\n /**\n * Configure resource for all signals.\n * If omitted, the default resource is used.\n */\n resource?: Resource;\n\n /**\n * Configure general attribute limits.\n * See also tracer_provider.limits, logger_provider.limits.\n */\n attribute_limits?: AttributeLimits;\n\n /**\n * Configure text map context propagators.\n */\n propagator?: Propagator;\n\n /**\n * Configure tracer provider.\n */\n tracer_provider?: TracerProvider;\n\n /**\n * Configure meter provider.\n */\n meter_provider?: MeterProvider;\n\n /**\n * Configure logger provider.\n */\n logger_provider?: LoggerProvider;\n}\n\nexport function initializeDefaultConfiguration(): ConfigurationModel {\n const config: ConfigurationModel = {\n disabled: false,\n log_level: DiagLogLevel.INFO,\n resource: {},\n attribute_limits: {\n attribute_count_limit: 128,\n },\n };\n\n return config;\n}\nexport interface AttributeLimits {\n /**\n * Configure max attribute value size.\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.\n * Value must be non-negative.\n * If omitted or null, 128 is used.\n */\n attribute_count_limit: number;\n}\n\nexport interface Propagator {\n /**\n * Configure the propagators in the composite text map propagator.\n * Entries from .composite_list are appended to the list here with duplicates filtered out.\n * Built-in propagator keys include: tracecontext, baggage, b3, b3multi, jaeger, ottrace.\n * Known third party keys include: xray.\n * If the resolved list of propagators (from .composite and .composite_list) is empty, a noop propagator is used.\n */\n composite?: object[];\n\n /**\n * Configure the propagators in the composite text map propagator.\n * Entries are appended to .composite with duplicates filtered out.\n * The value is a comma separated list of propagator identifiers matching the format of OTEL_PROPAGATORS.\n * Built-in propagator identifiers include: tracecontext, baggage, b3, b3multi, jaeger, ottrace.\n * Known third party identifiers include: xray.\n * If the resolved list of propagators (from .composite and .composite_list) is empty, a noop propagator is used.\n */\n composite_list?: string;\n}\n"]}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import type { ExperimentalOtlpFileExporter, OtlpGrpcExporter, OtlpHttpExporter, SeverityNumber } from './commonModel';
|
|
2
|
-
export declare function initializeDefaultLoggerProviderConfiguration(): Required<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'?: ExperimentalLoggerConfigurator;
|
|
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'?: ExperimentalOtlpFileExporter;
|
|
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 ExperimentalLoggerConfigurator {
|
|
96
|
-
/**
|
|
97
|
-
* Configure the default logger config used there is no matching entry in .logger_configurator/development.loggers.
|
|
98
|
-
*/
|
|
99
|
-
default_config?: ExperimentalLoggerConfig;
|
|
100
|
-
/**
|
|
101
|
-
* Configure loggers.
|
|
102
|
-
*/
|
|
103
|
-
loggers?: ExperimentalLoggerMatcherAndConfig[];
|
|
104
|
-
}
|
|
105
|
-
export interface ExperimentalLoggerMatcherAndConfig {
|
|
106
|
-
/**
|
|
107
|
-
* Configure logger names to match, evaluated as follows:
|
|
108
|
-
* * If the logger name exactly matches.
|
|
109
|
-
* * If the logger name matches the wildcard pattern, where '?' matches any single character
|
|
110
|
-
* and '*' matches any number of characters including none.
|
|
111
|
-
*/
|
|
112
|
-
name: string;
|
|
113
|
-
/**
|
|
114
|
-
* The logger config.
|
|
115
|
-
*/
|
|
116
|
-
config: ExperimentalLoggerConfig;
|
|
117
|
-
}
|
|
118
|
-
export interface ExperimentalLoggerConfig {
|
|
119
|
-
/**
|
|
120
|
-
* Configure if the logger is enabled or not.
|
|
121
|
-
*/
|
|
122
|
-
enabled?: boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Configure severity filtering.
|
|
125
|
-
* Log records with an non-zero (i.e. unspecified) severity number which is less than minimum_severity are not processed.
|
|
126
|
-
*/
|
|
127
|
-
minimum_severity?: SeverityNumber;
|
|
128
|
-
/**
|
|
129
|
-
* Configure trace based filtering.
|
|
130
|
-
* If true, log records associated with unsampled trace contexts traces are not processed. If false, or if a log record is not associated with a trace context, trace based filtering is not applied.
|
|
131
|
-
*/
|
|
132
|
-
trace_based?: boolean;
|
|
133
|
-
}
|
|
134
|
-
//# sourceMappingURL=loggerProviderModel.d.ts.map
|
|
@@ -1,18 +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.initializeDefaultLoggerProviderConfiguration = void 0;
|
|
8
|
-
function initializeDefaultLoggerProviderConfiguration() {
|
|
9
|
-
return {
|
|
10
|
-
processors: [],
|
|
11
|
-
limits: {
|
|
12
|
-
attribute_count_limit: 128,
|
|
13
|
-
},
|
|
14
|
-
'logger_configurator/development': {},
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
exports.initializeDefaultLoggerProviderConfiguration = initializeDefaultLoggerProviderConfiguration;
|
|
18
|
-
//# sourceMappingURL=loggerProviderModel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loggerProviderModel.js","sourceRoot":"","sources":["../../../src/models/loggerProviderModel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,YAAY,CAAC;;;AASb,SAAgB,4CAA4C;IAC1D,OAAO;QACL,UAAU,EAAE,EAAE;QACd,MAAM,EAAE;YACN,qBAAqB,EAAE,GAAG;SAC3B;QACD,iCAAiC,EAAE,EAAE;KACtC,CAAC;AACJ,CAAC;AARD,oGAQC","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 SeverityNumber,\n} from './commonModel';\n\nexport function initializeDefaultLoggerProviderConfiguration(): Required<LoggerProvider> {\n return {\n processors: [],\n limits: {\n attribute_count_limit: 128,\n },\n 'logger_configurator/development': {},\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'?: ExperimentalLoggerConfigurator;\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'?: ExperimentalOtlpFileExporter;\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 ExperimentalLoggerConfigurator {\n /**\n * Configure the default logger config used there is no matching entry in .logger_configurator/development.loggers.\n */\n default_config?: ExperimentalLoggerConfig;\n\n /**\n * Configure loggers.\n */\n loggers?: ExperimentalLoggerMatcherAndConfig[];\n}\n\nexport interface ExperimentalLoggerMatcherAndConfig {\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: ExperimentalLoggerConfig;\n}\n\nexport interface ExperimentalLoggerConfig {\n /**\n * Configure if the logger is enabled or not.\n */\n enabled?: boolean;\n\n /**\n * Configure severity filtering.\n * Log records with an non-zero (i.e. unspecified) severity number which is less than minimum_severity are not processed.\n */\n minimum_severity?: SeverityNumber;\n\n /**\n * Configure trace based filtering.\n * If true, log records associated with unsampled trace contexts traces are not processed. If false, or if a log record is not associated with a trace context, trace based filtering is not applied.\n */\n trace_based?: boolean;\n}\n"]}
|