Skip to content

Commit 97f372b

Browse files
authored
refactor(experimental/examples/opencensus-shim): use new exported string constants for semconv (#4763)
* refactor(experimental/examples/opencensus-shim): use new exported string constants for semconv * added changelog entry (experimental)
1 parent 9cd2021 commit 97f372b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

experimental/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ All notable changes to experimental packages in this project will be documented
4747

4848
* docs(instrumentation): better docs for supportedVersions option [#4693](https://github.com/open-telemetry/opentelemetry-js/pull/4693) @blumamir
4949
* docs: align all supported versions to a common format [#4696](https://github.com/open-telemetry/opentelemetry-js/pull/4696) @blumamir
50+
* refactor(examples): use new exported string constants for semconv in experimental/examples/opencensus-shim [#4763](https://github.com/open-telemetry/opentelemetry-js/pull/4763#pull) @Zen-cronic
5051

5152
### :house: (Internal)
5253

experimental/examples/opencensus-shim/setup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const {
2727
const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus');
2828
const { Resource } = require('@opentelemetry/resources');
2929
const {
30-
SemanticResourceAttributes,
30+
SEMRESATTRS_SERVICE_NAME,
3131
} = require('@opentelemetry/semantic-conventions');
3232
const { OpenCensusMetricProducer } = require('@opentelemetry/shim-opencensus');
3333
const instrumentationHttp = require('@opencensus/instrumentation-http');
@@ -46,7 +46,7 @@ module.exports = function setup(serviceName) {
4646
tracing.tracer = new oc.CoreTracer();
4747

4848
const resource = new Resource({
49-
[SemanticResourceAttributes.SERVICE_NAME]: serviceName,
49+
[SEMRESATTRS_SERVICE_NAME]: serviceName,
5050
});
5151
const tracerProvider = new NodeTracerProvider({ resource });
5252
tracerProvider.addSpanProcessor(

0 commit comments

Comments
 (0)