diff --git a/CHANGELOG.md b/CHANGELOG.md index c681fd118f..17d3bfe129 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/ ### :books: (Refine Doc) +* refactor(examples): use new exported string constants for semconv in examples/basic-tracer-node [#4759](https://github.com/open-telemetry/opentelemetry-js/pull/4759#pull) @Zen-cronic * refactor(examples): use new exported string constants for semconv in examples/http [#4750](https://github.com/open-telemetry/opentelemetry-js/pull/4750) @Zen-cronic * refactor(examples): use new exported string constants for semconv in examples/grpc-js [#4760](https://github.com/open-telemetry/opentelemetry-js/pull/4760#pull) @Zen-cronic * refactor(examples): use new exported string constants for semconv in examples/otlp-exporter-node [#4762](https://github.com/open-telemetry/opentelemetry-js/pull/4762) @Zen-cronic diff --git a/examples/basic-tracer-node/index.js b/examples/basic-tracer-node/index.js index 3c85a54c6e..889d4ba31e 100644 --- a/examples/basic-tracer-node/index.js +++ b/examples/basic-tracer-node/index.js @@ -2,13 +2,13 @@ const opentelemetry = require('@opentelemetry/api'); const { Resource } = require('@opentelemetry/resources'); -const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions'); +const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions'); const { BasicTracerProvider, ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base'); const { JaegerExporter } = require('@opentelemetry/exporter-jaeger'); const provider = new BasicTracerProvider({ resource: new Resource({ - [SemanticResourceAttributes.SERVICE_NAME]: 'basic-service', + [SEMRESATTRS_SERVICE_NAME]: 'basic-service', }), }); diff --git a/examples/basic-tracer-node/package.json b/examples/basic-tracer-node/package.json index 6219894855..b25d94c2ec 100644 --- a/examples/basic-tracer-node/package.json +++ b/examples/basic-tracer-node/package.json @@ -27,7 +27,7 @@ "@opentelemetry/api": "^1.0.2", "@opentelemetry/exporter-jaeger": "0.25.0", "@opentelemetry/resources": "0.25.0", - "@opentelemetry/semantic-conventions": "0.25.0", + "@opentelemetry/semantic-conventions": "^1.22.0", "@opentelemetry/sdk-trace-base": "0.25.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/basic-tracer-node"