diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 919b2099d51..85eb46abbc9 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -48,6 +48,7 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2 * feat(opentelemetry-configuration): parse more parameters from config file [#5955](https://github.com/open-telemetry/opentelemetry-js/pull/5955) @maryliag * feat(exporter-prometheus): support withoutTargetInfo option [#5962](https://github.com/open-telemetry/opentelemetry-js/pull/5962) @cjihrig * feat(opentelemetry-configuration): parse trace provider from config file [#5992](https://github.com/open-telemetry/opentelemetry-js/pull/5992) @maryliag +* feat(opentelemetry-configuration): parse config file with format 1.0-rc.2 [#6029](https://github.com/open-telemetry/opentelemetry-js/pull/6029) @maryliag ### :bug: Bug Fixes diff --git a/experimental/packages/opentelemetry-configuration/src/FileConfigProvider.ts b/experimental/packages/opentelemetry-configuration/src/FileConfigProvider.ts index 9b31cf2cebf..7c828254e21 100644 --- a/experimental/packages/opentelemetry-configuration/src/FileConfigProvider.ts +++ b/experimental/packages/opentelemetry-configuration/src/FileConfigProvider.ts @@ -72,7 +72,7 @@ export function hasValidConfigFile(): boolean { } function parseConfigFile(config: ConfigurationModel) { - const supportedFileVersions = ['1.0-rc.1']; + const supportedFileVersions = ['1.0-rc.1', '1.0-rc.2']; const configFile = getStringFromEnv('OTEL_EXPERIMENTAL_CONFIG_FILE') || ''; const file = fs.readFileSync(configFile, 'utf8'); const parsedContent = yaml.parse(file); diff --git a/experimental/packages/opentelemetry-configuration/test/ConfigProvider.test.ts b/experimental/packages/opentelemetry-configuration/test/ConfigProvider.test.ts index b0063b9766a..6ff7110c55e 100644 --- a/experimental/packages/opentelemetry-configuration/test/ConfigProvider.test.ts +++ b/experimental/packages/opentelemetry-configuration/test/ConfigProvider.test.ts @@ -112,7 +112,7 @@ const defaultConfig: Configuration = { const configFromFile: Configuration = { disabled: false, - log_level: DiagLogLevel.DEBUG, + log_level: DiagLogLevel.INFO, node_resource_detectors: ['all'], resource: { schema_url: 'https://opentelemetry.io/schemas/1.16.0', diff --git a/experimental/packages/opentelemetry-configuration/test/fixtures/kitchen-sink.yaml b/experimental/packages/opentelemetry-configuration/test/fixtures/kitchen-sink.yaml index 85c40c0526e..f44e11628dd 100644 --- a/experimental/packages/opentelemetry-configuration/test/fixtures/kitchen-sink.yaml +++ b/experimental/packages/opentelemetry-configuration/test/fixtures/kitchen-sink.yaml @@ -8,13 +8,13 @@ # The file format version. # The yaml format is documented at # https://github.com/open-telemetry/opentelemetry-configuration/tree/main/schema -file_format: "1.0-rc.1" +file_format: "1.0-rc.2" # Configure if the SDK is disabled or not. # If omitted or null, false is used. disabled: false # Configure the log level of the internal logger used by the SDK. # If omitted, info is used. -log_level: debug +log_level: info # Configure general attribute limits. See also tracer_provider.limits, logger_provider.limits. attribute_limits: # Configure max attribute value size. @@ -200,12 +200,6 @@ meter_provider: # Configure port. # If omitted or null, 9464 is used. port: 9464 - # Configure Prometheus Exporter to produce metrics without a unit suffix or UNIT metadata. - # If omitted or null, false is used. - without_units: false - # Configure Prometheus Exporter to produce metrics without a type suffix. - # If omitted or null, false is used. - without_type_suffix: false # Configure Prometheus Exporter to produce metrics without a scope info metric. # If omitted or null, false is used. without_scope_info: false @@ -225,6 +219,15 @@ meter_provider: # If omitted, .included resource attributes are included. excluded: - "service.attr1" + # Configure how Prometheus metrics are exposed. Values include: + # + # * UnderscoreEscapingWithSuffixes, the default. This fully escapes metric names for classic Prometheus metric name compatibility, and includes appending type and unit suffixes. + # * UnderscoreEscapingWithoutSuffixes, metric names will continue to escape special characters to _, but suffixes won't be attached. + # * NoUTF8EscapingWithSuffixes will disable changing special characters to _. Special suffixes like units and _total for counters will be attached. + # * NoTranslation. This strategy bypasses all metric and label name translation, passing them through unaltered. + # + # If omitted or null, UnderscoreEscapingWithSuffixes is used. + translation_strategy: UnderscoreEscapingWithSuffixes # Configure metric producers. producers: - # Configure metric producer to be opencensus.