diff --git a/CHANGELOG.md b/CHANGELOG.md index c28822cbda..6edc132fd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/ ### :books: (Refine Doc) +* refactor(examples): use new exported string constants for semconv in examples/http [#4750](https://github.com/open-telemetry/opentelemetry-js/pull/4750) @Zen-cronic + ### :house: (Internal) ## 1.24.1 diff --git a/examples/http/tracer.js b/examples/http/tracer.js index 82dbca2f70..b2351221bd 100644 --- a/examples/http/tracer.js +++ b/examples/http/tracer.js @@ -4,7 +4,7 @@ const opentelemetry = require('@opentelemetry/api'); const { registerInstrumentations } = require('@opentelemetry/instrumentation'); const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node'); const { Resource } = require('@opentelemetry/resources'); -const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); +const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions'); const { SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); const { ZipkinExporter } = require('@opentelemetry/exporter-zipkin'); @@ -15,7 +15,7 @@ const EXPORTER = process.env.EXPORTER || ''; module.exports = (serviceName) => { const provider = new NodeTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: serviceName, + [SEMRESATTRS_SERVICE_NAME]: serviceName, }), });