@opentelemetry/configuration 0.211.0 → 0.213.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 (35) hide show
  1. package/build/src/ConfigFactory.js +1 -12
  2. package/build/src/ConfigFactory.js.map +1 -1
  3. package/build/src/EnvironmentConfigFactory.js +37 -86
  4. package/build/src/EnvironmentConfigFactory.js.map +1 -1
  5. package/build/src/FileConfigFactory.d.ts +2 -0
  6. package/build/src/FileConfigFactory.js +166 -113
  7. package/build/src/FileConfigFactory.js.map +1 -1
  8. package/build/src/IConfigFactory.js +1 -12
  9. package/build/src/IConfigFactory.js.map +1 -1
  10. package/build/src/index.js +1 -12
  11. package/build/src/index.js.map +1 -1
  12. package/build/src/models/commonModel.d.ts +77 -39
  13. package/build/src/models/commonModel.js +29 -13
  14. package/build/src/models/commonModel.js.map +1 -1
  15. package/build/src/models/configModel.js +1 -16
  16. package/build/src/models/configModel.js.map +1 -1
  17. package/build/src/models/loggerProviderModel.d.ts +26 -16
  18. package/build/src/models/loggerProviderModel.js +2 -12
  19. package/build/src/models/loggerProviderModel.js.map +1 -1
  20. package/build/src/models/meterProviderModel.d.ts +39 -50
  21. package/build/src/models/meterProviderModel.js +10 -13
  22. package/build/src/models/meterProviderModel.js.map +1 -1
  23. package/build/src/models/resourceModel.d.ts +4 -4
  24. package/build/src/models/resourceModel.js +1 -12
  25. package/build/src/models/resourceModel.js.map +1 -1
  26. package/build/src/models/tracerProviderModel.d.ts +72 -79
  27. package/build/src/models/tracerProviderModel.js +1 -12
  28. package/build/src/models/tracerProviderModel.js.map +1 -1
  29. package/build/src/utils.d.ts +3 -0
  30. package/build/src/utils.js +39 -13
  31. package/build/src/utils.js.map +1 -1
  32. package/build/src/version.d.ts +1 -1
  33. package/build/src/version.js +1 -1
  34. package/build/src/version.js.map +1 -1
  35. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"commonModel.js","sourceRoot":"","sources":["../../../src/models/commonModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,YAAY,CAAC;;;AA4Fb,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B","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\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 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 certificate_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 client_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 client_certificate_file?: 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 /**\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 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 certificate_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 client_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 client_certificate_file?: string;\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 /**\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 interface OtlpFileExporter {\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"]}
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,17 +1,6 @@
1
1
  /*
2
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.
3
+ * SPDX-License-Identifier: Apache-2.0
15
4
  */
16
5
  'use strict';
17
6
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -25,10 +14,6 @@ function initializeDefaultConfiguration() {
25
14
  attribute_limits: {
26
15
  attribute_count_limit: 128,
27
16
  },
28
- propagator: {
29
- composite: [{ tracecontext: null }, { baggage: null }],
30
- composite_list: 'tracecontext,baggage',
31
- },
32
17
  };
33
18
  return config;
34
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"configModel.js","sourceRoot":"","sources":["../../../src/models/configModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,YAAY,CAAC;;;AAEb,4CAAkD;AA0DlD,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;QACD,UAAU,EAAE;YACV,SAAS,EAAE,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YACtD,cAAc,EAAE,sBAAsB;SACvC;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAfD,wEAeC","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 { DiagLogLevel } from '@opentelemetry/api';\nimport { TracerProvider } from './tracerProviderModel';\nimport { LoggerProvider } from './loggerProviderModel';\nimport { Resource } from './resourceModel';\nimport { 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 * Node resource detectors\n * If omitted, all is used.\n */\n node_resource_detectors?: string[];\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 propagator: {\n composite: [{ tracecontext: null }, { baggage: null }],\n composite_list: 'tracecontext,baggage',\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
+ {"version":3,"file":"configModel.js","sourceRoot":"","sources":["../../../src/models/configModel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,YAAY,CAAC;;;AAEb,4CAAkD;AA0DlD,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 { TracerProvider } from './tracerProviderModel';\nimport { LoggerProvider } from './loggerProviderModel';\nimport { Resource } from './resourceModel';\nimport { 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 * Node resource detectors\n * If omitted, all is used.\n */\n node_resource_detectors?: string[];\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,5 +1,5 @@
1
- import { OtlpFileExporter, OtlpGrpcExporter, OtlpHttpExporter } from './commonModel';
2
- export declare function initializeDefaultLoggerProviderConfiguration(): LoggerProvider;
1
+ import { ExperimentalOtlpFileExporter, OtlpGrpcExporter, OtlpHttpExporter, SeverityNumber } from './commonModel';
2
+ export declare function initializeDefaultLoggerProviderConfiguration(): Required<LoggerProvider>;
3
3
  export interface LoggerProvider {
4
4
  /**
5
5
  * Configure log record processors.
@@ -13,7 +13,7 @@ export interface LoggerProvider {
13
13
  * Configure loggers.
14
14
  * This type is in development and subject to breaking changes in minor versions.
15
15
  */
16
- 'logger_configurator/development'?: LoggerConfigurator;
16
+ 'logger_configurator/development'?: ExperimentalLoggerConfigurator;
17
17
  }
18
18
  export interface SimpleLogRecordProcessor {
19
19
  /**
@@ -62,7 +62,7 @@ export interface LogRecordExporter {
62
62
  * Configure exporter to be OTLP with file transport.
63
63
  * This type is in development and subject to breaking changes in minor versions.
64
64
  */
65
- 'otlp_file/development'?: OtlpFileExporter;
65
+ 'otlp_file/development'?: ExperimentalOtlpFileExporter;
66
66
  /**
67
67
  * Configure exporter to be console.
68
68
  */
@@ -92,33 +92,43 @@ export interface LogRecordProcessor {
92
92
  */
93
93
  simple?: SimpleLogRecordProcessor;
94
94
  }
95
- export interface LoggerConfigurator {
95
+ export interface ExperimentalLoggerConfigurator {
96
96
  /**
97
97
  * Configure the default logger config used there is no matching entry in .logger_configurator/development.loggers.
98
98
  */
99
- default_config?: LoggerConfig;
99
+ default_config?: ExperimentalLoggerConfig;
100
100
  /**
101
101
  * Configure loggers.
102
102
  */
103
- loggers?: LoggerMatcherAndConfig[];
103
+ loggers?: ExperimentalLoggerMatcherAndConfig[];
104
104
  }
105
- export interface LoggerConfig {
106
- /**
107
- * Configure if the logger is enabled or not.
108
- */
109
- disabled: boolean;
110
- }
111
- export interface LoggerMatcherAndConfig {
105
+ export interface ExperimentalLoggerMatcherAndConfig {
112
106
  /**
113
107
  * Configure logger names to match, evaluated as follows:
114
108
  * * If the logger name exactly matches.
115
109
  * * If the logger name matches the wildcard pattern, where '?' matches any single character
116
110
  * and '*' matches any number of characters including none.
117
111
  */
118
- name?: string;
112
+ name: string;
119
113
  /**
120
114
  * The logger config.
121
115
  */
122
- config?: LoggerConfig;
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;
123
133
  }
124
134
  //# sourceMappingURL=loggerProviderModel.d.ts.map
@@ -1,17 +1,6 @@
1
1
  /*
2
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.
3
+ * SPDX-License-Identifier: Apache-2.0
15
4
  */
16
5
  'use strict';
17
6
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -22,6 +11,7 @@ function initializeDefaultLoggerProviderConfiguration() {
22
11
  limits: {
23
12
  attribute_count_limit: 128,
24
13
  },
14
+ 'logger_configurator/development': {},
25
15
  };
26
16
  }
27
17
  exports.initializeDefaultLoggerProviderConfiguration = initializeDefaultLoggerProviderConfiguration;
@@ -1 +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"]}
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 {\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"]}
@@ -1,5 +1,5 @@
1
- import { IncludeExclude, NameStringValuePair, OtlpHttpEncoding } from './commonModel';
2
- export declare function initializeDefaultMeterProviderConfiguration(): MeterProvider;
1
+ import { GrpcTls, HttpTls, IncludeExclude, NameStringValuePair, OtlpHttpEncoding } from './commonModel';
2
+ export declare function initializeDefaultMeterProviderConfiguration(): Required<MeterProvider>;
3
3
  export interface MeterProvider {
4
4
  /**
5
5
  * Configure metric readers.
@@ -119,30 +119,26 @@ export interface PushMetricExporter {
119
119
  * Configure exporter to be OTLP with file transport.
120
120
  * This type is in development and subject to breaking changes in minor versions.
121
121
  */
122
- 'otlp_file/development'?: OtlpFileMetricExporter;
122
+ 'otlp_file/development'?: ExperimentalOtlpFileMetricExporter;
123
123
  /**
124
124
  * Configure exporter to be console.
125
125
  */
126
- console?: object;
126
+ console?: ConsoleMetricExporter;
127
127
  }
128
128
  export interface PullMetricExporter {
129
129
  /**
130
130
  * Configure exporter to be prometheus.
131
131
  * This type is in development and subject to breaking changes in minor versions.
132
132
  */
133
- 'prometheus/development': PrometheusMetricExporter;
133
+ 'prometheus/development': ExperimentalPrometheusMetricExporter;
134
134
  }
135
135
  export interface MetricProducer {
136
136
  /**
137
137
  * Configure metric producer to be opencensus.
138
138
  */
139
139
  opencensus?: object;
140
- /**
141
- * Configure metric producer to be prometheus.
142
- */
143
- prometheus?: object;
144
140
  }
145
- export interface PrometheusMetricExporter {
141
+ export interface ExperimentalPrometheusMetricExporter {
146
142
  /**
147
143
  * Configure host.
148
144
  * If omitted or null, localhost is used.
@@ -158,10 +154,25 @@ export interface PrometheusMetricExporter {
158
154
  * If omitted or null, false is used.
159
155
  */
160
156
  without_scope_info?: boolean;
157
+ /**
158
+ * Configure Prometheus Exporter to produce metrics without a target info metric for the resource.
159
+ * If omitted or null, false is used.
160
+ */
161
+ without_target_info?: boolean;
161
162
  /**
162
163
  * Configure Prometheus Exporter to add resource attributes as metrics attributes.
163
164
  */
164
- with_resource_constant_labels: IncludeExclude;
165
+ with_resource_constant_labels?: IncludeExclude;
166
+ /**
167
+ * Configure how metric names are translated to Prometheus metric names.
168
+ */
169
+ translation_strategy?: ExperimentalPrometheusTranslationStrategy;
170
+ }
171
+ export declare enum ExperimentalPrometheusTranslationStrategy {
172
+ UnderscoreEscapingWithSuffixes = "underscore_escaping_with_suffixes",
173
+ UnderscoreEscapingWithoutSuffixes = "underscore_escaping_without_suffixes",
174
+ NoUtf8EscapingWithSuffixes = "no_utf8_escaping_with_suffixes",
175
+ NoTranslation = "no_translation"
165
176
  }
166
177
  export interface MetricReader {
167
178
  /**
@@ -180,23 +191,9 @@ export interface OtlpHttpMetricExporter {
180
191
  */
181
192
  endpoint?: string;
182
193
  /**
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.
194
+ * Configure TLS settings for the exporter.
186
195
  */
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;
196
+ tls?: HttpTls;
200
197
  /**
201
198
  * Configure headers. Entries have higher priority than entries from .headers_list.
202
199
  * If an entry's .value is null, the entry is ignored.
@@ -246,23 +243,9 @@ export interface OtlpGrpcMetricExporter {
246
243
  */
247
244
  endpoint?: string;
248
245
  /**
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.
246
+ * Configure TLS settings for the exporter.
264
247
  */
265
- client_certificate_file?: string;
248
+ tls?: GrpcTls;
266
249
  /**
267
250
  * Configure headers. Entries have higher priority than entries from .headers_list.
268
251
  * If an entry's .value is null, the entry is ignored.
@@ -286,12 +269,6 @@ export interface OtlpGrpcMetricExporter {
286
269
  * If omitted or null, 10000 is used.
287
270
  */
288
271
  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
272
  /**
296
273
  * Configure temporality preference.
297
274
  * Values include: cumulative, delta, low_memory.
@@ -305,7 +282,7 @@ export interface OtlpGrpcMetricExporter {
305
282
  */
306
283
  default_histogram_aggregation?: ExporterDefaultHistogramAggregation;
307
284
  }
308
- export interface OtlpFileMetricExporter {
285
+ export interface ExperimentalOtlpFileMetricExporter {
309
286
  /**
310
287
  * Configure output stream.
311
288
  * Values include stdout, or scheme+destination. For example: file:///path/to/file.jsonl.
@@ -334,6 +311,18 @@ export declare enum ExporterDefaultHistogramAggregation {
334
311
  Base2ExponentialBucketHistogram = "base2_exponential_bucket_histogram",
335
312
  ExplicitBucketHistogram = "explicit_bucket_histogram"
336
313
  }
314
+ export interface ConsoleMetricExporter {
315
+ /**
316
+ * Configure temporality preference.
317
+ * If omitted or null, cumulative is used.
318
+ */
319
+ temporality_preference?: ExporterTemporalityPreference;
320
+ /**
321
+ * Configure default histogram aggregation.
322
+ * If omitted or null, explicit_bucket_histogram is used.
323
+ */
324
+ default_histogram_aggregation?: ExporterDefaultHistogramAggregation;
325
+ }
337
326
  export interface View {
338
327
  /**
339
328
  * Configure view selector.
@@ -1,24 +1,14 @@
1
1
  /*
2
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.
3
+ * SPDX-License-Identifier: Apache-2.0
15
4
  */
16
5
  'use strict';
17
6
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.InstrumentType = exports.ExporterDefaultHistogramAggregation = exports.ExporterTemporalityPreference = exports.ExemplarFilter = exports.initializeDefaultMeterProviderConfiguration = void 0;
7
+ exports.InstrumentType = exports.ExporterDefaultHistogramAggregation = exports.ExporterTemporalityPreference = exports.ExperimentalPrometheusTranslationStrategy = exports.ExemplarFilter = exports.initializeDefaultMeterProviderConfiguration = void 0;
19
8
  function initializeDefaultMeterProviderConfiguration() {
20
9
  return {
21
10
  readers: [],
11
+ views: [],
22
12
  exemplar_filter: ExemplarFilter.TraceBased,
23
13
  };
24
14
  }
@@ -29,6 +19,13 @@ var ExemplarFilter;
29
19
  ExemplarFilter["AlwaysOn"] = "always_on";
30
20
  ExemplarFilter["TraceBased"] = "trace_based";
31
21
  })(ExemplarFilter = exports.ExemplarFilter || (exports.ExemplarFilter = {}));
22
+ var ExperimentalPrometheusTranslationStrategy;
23
+ (function (ExperimentalPrometheusTranslationStrategy) {
24
+ ExperimentalPrometheusTranslationStrategy["UnderscoreEscapingWithSuffixes"] = "underscore_escaping_with_suffixes";
25
+ ExperimentalPrometheusTranslationStrategy["UnderscoreEscapingWithoutSuffixes"] = "underscore_escaping_without_suffixes";
26
+ ExperimentalPrometheusTranslationStrategy["NoUtf8EscapingWithSuffixes"] = "no_utf8_escaping_with_suffixes";
27
+ ExperimentalPrometheusTranslationStrategy["NoTranslation"] = "no_translation";
28
+ })(ExperimentalPrometheusTranslationStrategy = exports.ExperimentalPrometheusTranslationStrategy || (exports.ExperimentalPrometheusTranslationStrategy = {}));
32
29
  var ExporterTemporalityPreference;
33
30
  (function (ExporterTemporalityPreference) {
34
31
  ExporterTemporalityPreference["Cumulative"] = "cumulative";
@@ -1 +1 @@
1
- {"version":3,"file":"meterProviderModel.js","sourceRoot":"","sources":["../../../src/models/meterProviderModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,YAAY,CAAC;;;AAQb,SAAgB,2CAA2C;IACzD,OAAO;QACL,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,cAAc,CAAC,UAAU;KAC3C,CAAC;AACJ,CAAC;AALD,kGAKC;AAuBD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,0CAAwB,CAAA;IACxB,wCAAsB,CAAA;IACtB,4CAA0B,CAAA;AAC5B,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAsWD,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACvC,0DAAyB,CAAA;IACzB,gDAAe,CAAA;IACf,yDAAwB,CAAA;AAC1B,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;AAED,IAAY,mCAGX;AAHD,WAAY,mCAAmC;IAC7C,6GAAsE,CAAA;IACtE,4FAAqD,CAAA;AACvD,CAAC,EAHW,mCAAmC,GAAnC,2CAAmC,KAAnC,2CAAmC,QAG9C;AAsDD,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;IACf,yCAAuB,CAAA;IACvB,0DAAwC,CAAA;IACxC,sDAAoC,CAAA;IACpC,wEAAsD,CAAA;IACtD,mDAAiC,CAAA;AACnC,CAAC,EARW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQzB","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 IncludeExclude,\n NameStringValuePair,\n OtlpHttpEncoding,\n} from './commonModel';\n\nexport function initializeDefaultMeterProviderConfiguration(): MeterProvider {\n return {\n readers: [],\n exemplar_filter: ExemplarFilter.TraceBased,\n };\n}\n\nexport interface MeterProvider {\n /**\n * Configure metric readers.\n */\n readers: MetricReader[];\n\n /**\n * Configure views.\n * Each view has a selector which determines the instrument(s) it applies to,\n * and a configuration for the resulting stream(s).\n */\n views?: View[];\n\n /**\n * Configure the exemplar filter.\n * Values include: trace_based, always_on, always_off.\n * If omitted or null, trace_based is used.\n */\n exemplar_filter?: ExemplarFilter;\n}\n\nexport enum ExemplarFilter {\n AlwaysOff = 'always_off',\n AlwaysOn = 'always_on',\n TraceBased = 'trace_based',\n}\n\nexport interface PeriodicMetricReader {\n /**\n * Configure delay interval (in milliseconds) between start of two consecutive exports.\n * Value must be non-negative.\n * If omitted or null, 60000 is used.\n */\n interval?: 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 timeout?: number;\n\n /**\n * Configure exporter.\n */\n exporter: PushMetricExporter;\n\n /**\n * Configure metric producers.\n */\n producers?: MetricProducer[];\n\n /**\n * Configure cardinality limits.\n */\n cardinality_limits?: CardinalityLimits;\n}\n\nexport interface PullMetricReader {\n /**\n * Configure exporter.\n */\n exporter: PullMetricExporter;\n\n /**\n * Configure metric producers.\n */\n producers?: MetricProducer[];\n\n /**\n * Configure cardinality limits.\n */\n cardinality_limits?: CardinalityLimits;\n}\n\nexport interface CardinalityLimits {\n /**\n * Configure default cardinality limit for all instrument types.\n * Instrument-specific cardinality limits take priority.\n * If omitted or null, 2000 is used.\n */\n default?: number;\n\n /**\n * Configure default cardinality limit for counter instruments.\n * If omitted or null, the value from .default is used.\n */\n counter?: number;\n\n /**\n * Configure default cardinality limit for gauge instruments.\n * If omitted or null, the value from .default is used.\n */\n gauge?: number;\n\n /**\n * Configure default cardinality limit for histogram instruments.\n * If omitted or null, the value from .default is used.\n */\n histogram?: number;\n\n /**\n * Configure default cardinality limit for observable_counter instruments.\n * If omitted or null, the value from .default is used.\n */\n observable_counter?: number;\n\n /**\n * Configure default cardinality limit for observable_gauge instruments.\n * If omitted or null, the value from .default is used.\n */\n observable_gauge?: number;\n\n /**\n * Configure default cardinality limit for observable_up_down_counter instruments.\n * If omitted or null, the value from .default is used.\n */\n observable_up_down_counter?: number;\n\n /**\n * Configure default cardinality limit for up_down_counter instruments.\n * If omitted or null, the value from .default is used.\n */\n up_down_counter?: number;\n}\n\nexport interface PushMetricExporter {\n /**\n * Configure exporter to be OTLP with HTTP transport.\n */\n otlp_http?: OtlpHttpMetricExporter;\n\n /**\n * Configure exporter to be OTLP with gRPC transport.\n */\n otlp_grpc?: OtlpGrpcMetricExporter;\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'?: OtlpFileMetricExporter;\n\n /**\n * Configure exporter to be console.\n */\n console?: object;\n}\n\nexport interface PullMetricExporter {\n /**\n * Configure exporter to be prometheus.\n * This type is in development and subject to breaking changes in minor versions.\n */\n 'prometheus/development': PrometheusMetricExporter;\n}\n\nexport interface MetricProducer {\n /**\n * Configure metric producer to be opencensus.\n */\n opencensus?: object;\n\n /**\n * Configure metric producer to be prometheus.\n */\n prometheus?: object;\n}\n\nexport interface PrometheusMetricExporter {\n /**\n * Configure host.\n * If omitted or null, localhost is used.\n */\n host?: string;\n\n /**\n * Configure port.\n * If omitted or null, 9464 is used.\n */\n port?: number;\n\n /**\n * Configure Prometheus Exporter to produce metrics without a scope info metric.\n * If omitted or null, false is used.\n */\n without_scope_info?: boolean;\n\n /**\n * Configure Prometheus Exporter to add resource attributes as metrics attributes.\n */\n with_resource_constant_labels: IncludeExclude;\n}\n\nexport interface MetricReader {\n /**\n * Configure a periodic metric reader.\n */\n periodic?: PeriodicMetricReader;\n\n /**\n * Configure a pull based metric reader.\n */\n pull?: PullMetricReader;\n}\n\nexport interface OtlpHttpMetricExporter {\n /**\n * Configure endpoint, including the metric specific path.\n * If omitted or null, http://localhost:4318/v1/metrics is used.\n */\n endpoint?: string;\n\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 certificate_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 client_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 client_certificate_file?: string;\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 /**\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 /**\n * Configure temporality preference.\n * Values include: cumulative, delta, low_memory.\n * If omitted or null, cumulative is used.\n */\n temporality_preference?: ExporterTemporalityPreference;\n\n /**\n * Configure default histogram aggregation.\n * Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram.\n * If omitted or null, explicit_bucket_histogram is used.\n */\n default_histogram_aggregation?: ExporterDefaultHistogramAggregation;\n}\n\nexport interface OtlpGrpcMetricExporter {\n /**\n * Configure endpoint.\n * If omitted or null, http://localhost:4317 is used.\n */\n endpoint?: string;\n\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 certificate_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 client_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 client_certificate_file?: string;\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 /**\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 /**\n * Configure temporality preference.\n * Values include: cumulative, delta, low_memory.\n * If omitted or null, cumulative is used.\n */\n temporality_preference?: ExporterTemporalityPreference;\n\n /**\n * Configure default histogram aggregation.\n * Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram.\n * If omitted or null, explicit_bucket_histogram is used.\n */\n default_histogram_aggregation?: ExporterDefaultHistogramAggregation;\n}\n\nexport interface OtlpFileMetricExporter {\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 /**\n * Configure temporality preference.\n * Values include: cumulative, delta, low_memory.\n * If omitted or null, cumulative is used.\n */\n temporality_preference?: ExporterTemporalityPreference;\n\n /**\n * Configure default histogram aggregation.\n * Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram.\n * If omitted or null, explicit_bucket_histogram is used.\n */\n default_histogram_aggregation?: ExporterDefaultHistogramAggregation;\n}\n\nexport enum ExporterTemporalityPreference {\n Cumulative = 'cumulative',\n Delta = 'delta',\n LowMemory = 'low_memory',\n}\n\nexport enum ExporterDefaultHistogramAggregation {\n Base2ExponentialBucketHistogram = 'base2_exponential_bucket_histogram',\n ExplicitBucketHistogram = 'explicit_bucket_histogram',\n}\n\nexport interface View {\n /**\n * Configure view selector.\n */\n selector?: ViewSelector;\n\n /**\n * Configure view stream.\n */\n stream?: ViewStream;\n}\n\nexport interface ViewSelector {\n /**\n * Configure instrument name selection criteria.\n * If omitted or null, all instrument names match.\n */\n instrument_name?: string;\n\n /**\n * Configure instrument type selection criteria.\n * Values include: counter, gauge, histogram, observable_counter, observable_gauge,\n * observable_up_down_counter, up_down_counter.\n * If omitted or null, all instrument types match.\n */\n instrument_type?: InstrumentType;\n\n /**\n * Configure the instrument unit selection criteria.\n * If omitted or null, all instrument units match.\n */\n unit?: string;\n\n /**\n * Configure meter name selection criteria.\n * If omitted or null, all meter names match.\n */\n meter_name?: string;\n\n /**\n * Configure meter version selection criteria.\n * If omitted or null, all meter versions match.\n */\n meter_version?: string;\n\n /**\n * Configure meter schema url selection criteria.\n * If omitted or null, all meter schema URLs match.\n */\n meter_schema_url?: string;\n}\n\nexport enum InstrumentType {\n Counter = 'counter',\n Gauge = 'gauge',\n Histogram = 'histogram',\n ObservableCounter = 'observable_counter',\n ObservableGauge = 'observable_gauge',\n ObservableUpDownCounter = 'observable_up_down_counter',\n UpDownCounter = 'up_down_counter',\n}\n\nexport interface ViewStream {\n /**\n * Configure metric name of the resulting stream(s).\n * If omitted or null, the instrument's original name is used.\n */\n name?: string;\n\n /**\n * Configure metric description of the resulting stream(s).\n * If omitted or null, the instrument's origin description is used.\n */\n description?: string;\n\n /**\n * Configure aggregation of the resulting stream(s).\n * Values include: default, drop, explicit_bucket_histogram, base2_exponential_bucket_histogram, last_value, sum.\n * If omitted, default is used.\n */\n aggregation?: Aggregation;\n\n /**\n * Configure the aggregation cardinality limit.\n * If omitted or null, the metric reader's default cardinality limit is used.\n */\n aggregation_cardinality_limit?: number;\n\n /**\n * Configure attribute keys retained in the resulting stream(s).\n */\n attribute_keys?: IncludeExclude;\n}\n\nexport interface Aggregation {\n /**\n * Configure aggregation to be default.\n */\n default?: object;\n\n /**\n * Configure aggregation to be drop.\n */\n drop?: object;\n\n /**\n * Configure aggregation to be explicit_bucket_histogram.\n */\n explicit_bucket_histogram?: ExplicitBucketHistogramAggregation;\n\n /**\n * Configure aggregation to be base2_exponential_bucket_histogram.\n */\n base2_exponential_bucket_histogram?: Base2ExponentialBucketHistogramAggregation;\n\n /**\n * Configure aggregation to be last_value.\n */\n last_value?: object;\n\n /**\n * Configure aggregation to be sum.\n */\n sum?: object;\n}\n\nexport interface ExplicitBucketHistogramAggregation {\n /**\n * Configure bucket boundaries.\n * If omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000] is used.\n */\n boundaries?: number[];\n\n /**\n * Configure record min and max.\n * If omitted or null, true is used.\n */\n record_min_max?: boolean;\n}\n\nexport interface Base2ExponentialBucketHistogramAggregation {\n /**\n * Configure max_scale.\n */\n max_scale?: number;\n\n /**\n * Configure max_size.\n */\n max_size?: number;\n\n /**\n * Configure record min and max.\n * If omitted or null, true is used.\n */\n record_min_max?: boolean;\n}\n"]}
1
+ {"version":3,"file":"meterProviderModel.js","sourceRoot":"","sources":["../../../src/models/meterProviderModel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,YAAY,CAAC;;;AAUb,SAAgB,2CAA2C;IACzD,OAAO;QACL,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,EAAE;QACT,eAAe,EAAE,cAAc,CAAC,UAAU;KAC3C,CAAC;AACJ,CAAC;AAND,kGAMC;AAuBD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,0CAAwB,CAAA;IACxB,wCAAsB,CAAA;IACtB,4CAA0B,CAAA;AAC5B,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AA+KD,IAAY,yCAKX;AALD,WAAY,yCAAyC;IACnD,iHAAoE,CAAA;IACpE,uHAA0E,CAAA;IAC1E,0GAA6D,CAAA;IAC7D,6EAAgC,CAAA;AAClC,CAAC,EALW,yCAAyC,GAAzC,iDAAyC,KAAzC,iDAAyC,QAKpD;AAwJD,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACvC,0DAAyB,CAAA;IACzB,gDAAe,CAAA;IACf,yDAAwB,CAAA;AAC1B,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC;AAED,IAAY,mCAGX;AAHD,WAAY,mCAAmC;IAC7C,6GAAsE,CAAA;IACtE,4FAAqD,CAAA;AACvD,CAAC,EAHW,mCAAmC,GAAnC,2CAAmC,KAAnC,2CAAmC,QAG9C;AAoED,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,iCAAe,CAAA;IACf,yCAAuB,CAAA;IACvB,0DAAwC,CAAA;IACxC,sDAAoC,CAAA;IACpC,wEAAsD,CAAA;IACtD,mDAAiC,CAAA;AACnC,CAAC,EARW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQzB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n'use strict';\n\nimport {\n GrpcTls,\n HttpTls,\n IncludeExclude,\n NameStringValuePair,\n OtlpHttpEncoding,\n} from './commonModel';\n\nexport function initializeDefaultMeterProviderConfiguration(): Required<MeterProvider> {\n return {\n readers: [],\n views: [],\n exemplar_filter: ExemplarFilter.TraceBased,\n };\n}\n\nexport interface MeterProvider {\n /**\n * Configure metric readers.\n */\n readers: MetricReader[];\n\n /**\n * Configure views.\n * Each view has a selector which determines the instrument(s) it applies to,\n * and a configuration for the resulting stream(s).\n */\n views?: View[];\n\n /**\n * Configure the exemplar filter.\n * Values include: trace_based, always_on, always_off.\n * If omitted or null, trace_based is used.\n */\n exemplar_filter?: ExemplarFilter;\n}\n\nexport enum ExemplarFilter {\n AlwaysOff = 'always_off',\n AlwaysOn = 'always_on',\n TraceBased = 'trace_based',\n}\n\nexport interface PeriodicMetricReader {\n /**\n * Configure delay interval (in milliseconds) between start of two consecutive exports.\n * Value must be non-negative.\n * If omitted or null, 60000 is used.\n */\n interval?: 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 timeout?: number;\n\n /**\n * Configure exporter.\n */\n exporter: PushMetricExporter;\n\n /**\n * Configure metric producers.\n */\n producers?: MetricProducer[];\n\n /**\n * Configure cardinality limits.\n */\n cardinality_limits?: CardinalityLimits;\n}\n\nexport interface PullMetricReader {\n /**\n * Configure exporter.\n */\n exporter: PullMetricExporter;\n\n /**\n * Configure metric producers.\n */\n producers?: MetricProducer[];\n\n /**\n * Configure cardinality limits.\n */\n cardinality_limits?: CardinalityLimits;\n}\n\nexport interface CardinalityLimits {\n /**\n * Configure default cardinality limit for all instrument types.\n * Instrument-specific cardinality limits take priority.\n * If omitted or null, 2000 is used.\n */\n default?: number;\n\n /**\n * Configure default cardinality limit for counter instruments.\n * If omitted or null, the value from .default is used.\n */\n counter?: number;\n\n /**\n * Configure default cardinality limit for gauge instruments.\n * If omitted or null, the value from .default is used.\n */\n gauge?: number;\n\n /**\n * Configure default cardinality limit for histogram instruments.\n * If omitted or null, the value from .default is used.\n */\n histogram?: number;\n\n /**\n * Configure default cardinality limit for observable_counter instruments.\n * If omitted or null, the value from .default is used.\n */\n observable_counter?: number;\n\n /**\n * Configure default cardinality limit for observable_gauge instruments.\n * If omitted or null, the value from .default is used.\n */\n observable_gauge?: number;\n\n /**\n * Configure default cardinality limit for observable_up_down_counter instruments.\n * If omitted or null, the value from .default is used.\n */\n observable_up_down_counter?: number;\n\n /**\n * Configure default cardinality limit for up_down_counter instruments.\n * If omitted or null, the value from .default is used.\n */\n up_down_counter?: number;\n}\n\nexport interface PushMetricExporter {\n /**\n * Configure exporter to be OTLP with HTTP transport.\n */\n otlp_http?: OtlpHttpMetricExporter;\n\n /**\n * Configure exporter to be OTLP with gRPC transport.\n */\n otlp_grpc?: OtlpGrpcMetricExporter;\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'?: ExperimentalOtlpFileMetricExporter;\n\n /**\n * Configure exporter to be console.\n */\n console?: ConsoleMetricExporter;\n}\n\nexport interface PullMetricExporter {\n /**\n * Configure exporter to be prometheus.\n * This type is in development and subject to breaking changes in minor versions.\n */\n 'prometheus/development': ExperimentalPrometheusMetricExporter;\n}\n\nexport interface MetricProducer {\n /**\n * Configure metric producer to be opencensus.\n */\n opencensus?: object;\n}\n\nexport interface ExperimentalPrometheusMetricExporter {\n /**\n * Configure host.\n * If omitted or null, localhost is used.\n */\n host?: string;\n\n /**\n * Configure port.\n * If omitted or null, 9464 is used.\n */\n port?: number;\n\n /**\n * Configure Prometheus Exporter to produce metrics without a scope info metric.\n * If omitted or null, false is used.\n */\n without_scope_info?: boolean;\n\n /**\n * Configure Prometheus Exporter to produce metrics without a target info metric for the resource.\n * If omitted or null, false is used.\n */\n without_target_info?: boolean;\n\n /**\n * Configure Prometheus Exporter to add resource attributes as metrics attributes.\n */\n with_resource_constant_labels?: IncludeExclude;\n\n /**\n * Configure how metric names are translated to Prometheus metric names.\n */\n translation_strategy?: ExperimentalPrometheusTranslationStrategy;\n}\n\nexport enum ExperimentalPrometheusTranslationStrategy {\n UnderscoreEscapingWithSuffixes = 'underscore_escaping_with_suffixes',\n UnderscoreEscapingWithoutSuffixes = 'underscore_escaping_without_suffixes',\n NoUtf8EscapingWithSuffixes = 'no_utf8_escaping_with_suffixes',\n NoTranslation = 'no_translation',\n}\n\nexport interface MetricReader {\n /**\n * Configure a periodic metric reader.\n */\n periodic?: PeriodicMetricReader;\n\n /**\n * Configure a pull based metric reader.\n */\n pull?: PullMetricReader;\n}\n\nexport interface OtlpHttpMetricExporter {\n /**\n * Configure endpoint, including the metric specific path.\n * If omitted or null, http://localhost:4318/v1/metrics is used.\n */\n endpoint?: string;\n\n /**\n * Configure TLS settings for the exporter.\n */\n tls?: HttpTls;\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 /**\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 /**\n * Configure temporality preference.\n * Values include: cumulative, delta, low_memory.\n * If omitted or null, cumulative is used.\n */\n temporality_preference?: ExporterTemporalityPreference;\n\n /**\n * Configure default histogram aggregation.\n * Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram.\n * If omitted or null, explicit_bucket_histogram is used.\n */\n default_histogram_aggregation?: ExporterDefaultHistogramAggregation;\n}\n\nexport interface OtlpGrpcMetricExporter {\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 /**\n * Configure temporality preference.\n * Values include: cumulative, delta, low_memory.\n * If omitted or null, cumulative is used.\n */\n temporality_preference?: ExporterTemporalityPreference;\n\n /**\n * Configure default histogram aggregation.\n * Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram.\n * If omitted or null, explicit_bucket_histogram is used.\n */\n default_histogram_aggregation?: ExporterDefaultHistogramAggregation;\n}\n\nexport interface ExperimentalOtlpFileMetricExporter {\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 /**\n * Configure temporality preference.\n * Values include: cumulative, delta, low_memory.\n * If omitted or null, cumulative is used.\n */\n temporality_preference?: ExporterTemporalityPreference;\n\n /**\n * Configure default histogram aggregation.\n * Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram.\n * If omitted or null, explicit_bucket_histogram is used.\n */\n default_histogram_aggregation?: ExporterDefaultHistogramAggregation;\n}\n\nexport enum ExporterTemporalityPreference {\n Cumulative = 'cumulative',\n Delta = 'delta',\n LowMemory = 'low_memory',\n}\n\nexport enum ExporterDefaultHistogramAggregation {\n Base2ExponentialBucketHistogram = 'base2_exponential_bucket_histogram',\n ExplicitBucketHistogram = 'explicit_bucket_histogram',\n}\n\nexport interface ConsoleMetricExporter {\n /**\n * Configure temporality preference.\n * If omitted or null, cumulative is used.\n */\n temporality_preference?: ExporterTemporalityPreference;\n\n /**\n * Configure default histogram aggregation.\n * If omitted or null, explicit_bucket_histogram is used.\n */\n default_histogram_aggregation?: ExporterDefaultHistogramAggregation;\n}\n\nexport interface View {\n /**\n * Configure view selector.\n */\n selector?: ViewSelector;\n\n /**\n * Configure view stream.\n */\n stream?: ViewStream;\n}\n\nexport interface ViewSelector {\n /**\n * Configure instrument name selection criteria.\n * If omitted or null, all instrument names match.\n */\n instrument_name?: string;\n\n /**\n * Configure instrument type selection criteria.\n * Values include: counter, gauge, histogram, observable_counter, observable_gauge,\n * observable_up_down_counter, up_down_counter.\n * If omitted or null, all instrument types match.\n */\n instrument_type?: InstrumentType;\n\n /**\n * Configure the instrument unit selection criteria.\n * If omitted or null, all instrument units match.\n */\n unit?: string;\n\n /**\n * Configure meter name selection criteria.\n * If omitted or null, all meter names match.\n */\n meter_name?: string;\n\n /**\n * Configure meter version selection criteria.\n * If omitted or null, all meter versions match.\n */\n meter_version?: string;\n\n /**\n * Configure meter schema url selection criteria.\n * If omitted or null, all meter schema URLs match.\n */\n meter_schema_url?: string;\n}\n\nexport enum InstrumentType {\n Counter = 'counter',\n Gauge = 'gauge',\n Histogram = 'histogram',\n ObservableCounter = 'observable_counter',\n ObservableGauge = 'observable_gauge',\n ObservableUpDownCounter = 'observable_up_down_counter',\n UpDownCounter = 'up_down_counter',\n}\n\nexport interface ViewStream {\n /**\n * Configure metric name of the resulting stream(s).\n * If omitted or null, the instrument's original name is used.\n */\n name?: string;\n\n /**\n * Configure metric description of the resulting stream(s).\n * If omitted or null, the instrument's origin description is used.\n */\n description?: string;\n\n /**\n * Configure aggregation of the resulting stream(s).\n * Values include: default, drop, explicit_bucket_histogram, base2_exponential_bucket_histogram, last_value, sum.\n * If omitted, default is used.\n */\n aggregation?: Aggregation;\n\n /**\n * Configure the aggregation cardinality limit.\n * If omitted or null, the metric reader's default cardinality limit is used.\n */\n aggregation_cardinality_limit?: number;\n\n /**\n * Configure attribute keys retained in the resulting stream(s).\n */\n attribute_keys?: IncludeExclude;\n}\n\nexport interface Aggregation {\n /**\n * Configure aggregation to be default.\n */\n default?: object;\n\n /**\n * Configure aggregation to be drop.\n */\n drop?: object;\n\n /**\n * Configure aggregation to be explicit_bucket_histogram.\n */\n explicit_bucket_histogram?: ExplicitBucketHistogramAggregation;\n\n /**\n * Configure aggregation to be base2_exponential_bucket_histogram.\n */\n base2_exponential_bucket_histogram?: Base2ExponentialBucketHistogramAggregation;\n\n /**\n * Configure aggregation to be last_value.\n */\n last_value?: object;\n\n /**\n * Configure aggregation to be sum.\n */\n sum?: object;\n}\n\nexport interface ExplicitBucketHistogramAggregation {\n /**\n * Configure bucket boundaries.\n * If omitted, [0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000] is used.\n */\n boundaries?: number[];\n\n /**\n * Configure record min and max.\n * If omitted or null, true is used.\n */\n record_min_max?: boolean;\n}\n\nexport interface Base2ExponentialBucketHistogramAggregation {\n /**\n * Configure max_scale.\n */\n max_scale?: number;\n\n /**\n * Configure max_size.\n */\n max_size?: number;\n\n /**\n * Configure record min and max.\n * If omitted or null, true is used.\n */\n record_min_max?: boolean;\n}\n"]}
@@ -22,14 +22,14 @@ export interface Resource {
22
22
  * This type is in development and subject to breaking changes in minor versions.
23
23
  * If omitted or null, resource detection is disabled.
24
24
  */
25
- 'detection/development'?: ResourceDetection;
25
+ 'detection/development'?: ExperimentalResourceDetection;
26
26
  }
27
27
  export interface AttributeNameValue {
28
28
  name: string;
29
29
  value: string | boolean | number | string[] | boolean[] | number[] | undefined;
30
30
  type?: 'string' | 'bool' | 'int' | 'double' | 'string_array' | 'bool_array' | 'int_array' | 'double_array';
31
31
  }
32
- export interface ResourceDetection {
32
+ export interface ExperimentalResourceDetection {
33
33
  /**
34
34
  * Configure attributes provided by resource detectors.
35
35
  */
@@ -39,9 +39,9 @@ export interface ResourceDetection {
39
39
  * Resource detector names are dependent on the SDK language ecosystem. Please consult documentation for each respective language.
40
40
  * If omitted or null, no resource detectors are enabled.
41
41
  */
42
- detectors?: ResourceDetector;
42
+ detectors?: ExperimentalResourceDetector;
43
43
  }
44
- export interface ResourceDetector {
44
+ export interface ExperimentalResourceDetector {
45
45
  /**
46
46
  * Enable the container resource detector, which populates container.* attributes.
47
47
  */
@@ -1,17 +1,6 @@
1
1
  /*
2
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.
3
+ * SPDX-License-Identifier: Apache-2.0
15
4
  */
16
5
  'use strict';
17
6
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"resourceModel.js","sourceRoot":"","sources":["../../../src/models/resourceModel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,YAAY,CAAC","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 { IncludeExclude } from './commonModel';\n\nexport interface Resource {\n /**\n * Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.\n * Entries must contain .name and .value, and may optionally include .type. If an entry's .type omitted or null, string is used.\n * The .value's type must match the .type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array.\n */\n attributes?: AttributeNameValue[];\n\n /**\n * Configure resource attributes. Entries have lower priority than entries from .resource.attributes.\n * The value is a list of comma separated key-value pairs matching the format of OTEL_RESOURCE_ATTRIBUTES.\n * If omitted or null, no resource attributes are added.\n */\n attributes_list?: string;\n\n /**\n * Configure resource schema URL.\n * If omitted or null, no schema URL is used.\n */\n schema_url?: string;\n\n /**\n * Configure resource detection.\n * This type is in development and subject to breaking changes in minor versions.\n * If omitted or null, resource detection is disabled.\n */\n 'detection/development'?: ResourceDetection;\n}\n\nexport interface AttributeNameValue {\n name: string;\n value:\n | string\n | boolean\n | number\n | string[]\n | boolean[]\n | number[]\n | undefined;\n type?:\n | 'string'\n | 'bool'\n | 'int'\n | 'double'\n | 'string_array'\n | 'bool_array'\n | 'int_array'\n | 'double_array';\n}\n\nexport interface ResourceDetection {\n /**\n * Configure attributes provided by resource detectors.\n */\n attributes?: IncludeExclude;\n\n /**\n * Configure resource detectors.\n * Resource detector names are dependent on the SDK language ecosystem. Please consult documentation for each respective language.\n * If omitted or null, no resource detectors are enabled.\n */\n detectors?: ResourceDetector;\n}\n\nexport interface ResourceDetector {\n /**\n * Enable the container resource detector, which populates container.* attributes.\n */\n container?: object;\n\n /**\n * Enable the host resource detector, which populates host.* and os.* attributes.\n */\n host?: object;\n\n /**\n * Enable the process resource detector, which populates process.* attributes.\n */\n process?: object;\n\n /**\n * Enable the service detector, which populates service.name based on the OTEL_SERVICE_NAME\n * environment variable and service.instance.id.\n */\n service?: object;\n}\n"]}
1
+ {"version":3,"file":"resourceModel.js","sourceRoot":"","sources":["../../../src/models/resourceModel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,YAAY,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n'use strict';\n\nimport { IncludeExclude } from './commonModel';\n\nexport interface Resource {\n /**\n * Configure resource attributes. Entries have higher priority than entries from .resource.attributes_list.\n * Entries must contain .name and .value, and may optionally include .type. If an entry's .type omitted or null, string is used.\n * The .value's type must match the .type. Values for .type include: string, bool, int, double, string_array, bool_array, int_array, double_array.\n */\n attributes?: AttributeNameValue[];\n\n /**\n * Configure resource attributes. Entries have lower priority than entries from .resource.attributes.\n * The value is a list of comma separated key-value pairs matching the format of OTEL_RESOURCE_ATTRIBUTES.\n * If omitted or null, no resource attributes are added.\n */\n attributes_list?: string;\n\n /**\n * Configure resource schema URL.\n * If omitted or null, no schema URL is used.\n */\n schema_url?: string;\n\n /**\n * Configure resource detection.\n * This type is in development and subject to breaking changes in minor versions.\n * If omitted or null, resource detection is disabled.\n */\n 'detection/development'?: ExperimentalResourceDetection;\n}\n\nexport interface AttributeNameValue {\n name: string;\n value:\n | string\n | boolean\n | number\n | string[]\n | boolean[]\n | number[]\n | undefined;\n type?:\n | 'string'\n | 'bool'\n | 'int'\n | 'double'\n | 'string_array'\n | 'bool_array'\n | 'int_array'\n | 'double_array';\n}\n\nexport interface ExperimentalResourceDetection {\n /**\n * Configure attributes provided by resource detectors.\n */\n attributes?: IncludeExclude;\n\n /**\n * Configure resource detectors.\n * Resource detector names are dependent on the SDK language ecosystem. Please consult documentation for each respective language.\n * If omitted or null, no resource detectors are enabled.\n */\n detectors?: ExperimentalResourceDetector;\n}\n\nexport interface ExperimentalResourceDetector {\n /**\n * Enable the container resource detector, which populates container.* attributes.\n */\n container?: object;\n\n /**\n * Enable the host resource detector, which populates host.* and os.* attributes.\n */\n host?: object;\n\n /**\n * Enable the process resource detector, which populates process.* attributes.\n */\n process?: object;\n\n /**\n * Enable the service detector, which populates service.name based on the OTEL_SERVICE_NAME\n * environment variable and service.instance.id.\n */\n service?: object;\n}\n"]}