Skip to content

Commit

Permalink
refactor(examples/basic-tracer-node): use new exported string constan…
Browse files Browse the repository at this point in the history
…ts for semconv (#4759)

* refactor(examples/basic-tracer-node): use new exported string constants for semconv

* updated semconv pacakge ^1.22.0

* Update CHANGELOG.md

---------

Co-authored-by: Marc Pichler <[email protected]>
  • Loading branch information
Zen-cronic and pichlermarc authored Jun 5, 2024
1 parent 929e345 commit 97d0ec5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/basic-tracer-node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}),
});

Expand Down
2 changes: 1 addition & 1 deletion examples/basic-tracer-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 97d0ec5

Please sign in to comment.