diff --git a/CHANGELOG.md b/CHANGELOG.md index d2b2fc581b..c681fd118f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ 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 +* 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 * refactor(examples): use new exported string constants for semconv in examples/opentracing-shim [#4761](https://github.com/open-telemetry/opentelemetry-js/pull/4761) @Zen-cronic diff --git a/examples/grpc-js/package.json b/examples/grpc-js/package.json index 99dc941919..2ab39aae80 100644 --- a/examples/grpc-js/package.json +++ b/examples/grpc-js/package.json @@ -35,7 +35,7 @@ "@opentelemetry/instrumentation": "^0.27.0", "@opentelemetry/instrumentation-grpc": "^0.27.0", "@opentelemetry/resources": "^1.0.1", - "@opentelemetry/semantic-conventions": "^1.0.1", + "@opentelemetry/semantic-conventions": "^1.22.0", "@opentelemetry/sdk-trace-base": "^1.0.1", "@opentelemetry/sdk-trace-node": "^1.0.1", "google-protobuf": "^3.9.2" diff --git a/examples/grpc-js/tracer.js b/examples/grpc-js/tracer.js index 5c5a9edb86..77d30dbd1c 100644 --- a/examples/grpc-js/tracer.js +++ b/examples/grpc-js/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, }), });