Skip to content

Commit

Permalink
chore(examples/graphql): use exported strings for attributes (#2122)
Browse files Browse the repository at this point in the history
Use exported strings for Semantic Attributes

Co-authored-by: Trent Mick <trentm@gmail.com>
Co-authored-by: Amir Blum <amirgiraffe@gmail.com>
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
  • Loading branch information
4 people committed Apr 25, 2024
1 parent 80cbee7 commit 73e01f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@opentelemetry/resources": "~1.0.0",
"@opentelemetry/sdk-trace-base": "~1.0.0",
"@opentelemetry/sdk-trace-node": "~1.0.0",
"@opentelemetry/semantic-conventions": "~1.0.0",
"@opentelemetry/semantic-conventions": "^1.23.0",
"apollo-server": "^2.18.1",
"cross-fetch": "^3.0.5",
"express": "^4.17.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/graphql/tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ const { OTLPTraceExporter } = require('@opentelemetry/exporter-otlp-http');
const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
const { ExpressInstrumentation } = require('@opentelemetry/instrumentation-express');
const { Resource } = require('@opentelemetry/resources');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions');

const provider = new NodeTracerProvider({
resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: 'graphql-service',
[SEMRESATTRS_SERVICE_NAME]: 'graphql-service',
}),
});

Expand Down

0 comments on commit 73e01f2

Please sign in to comment.