Skip to content

Commit 73e01f2

Browse files
maryliagtrentmblumamirpichlermarc
authored
chore(examples/graphql): use exported strings for attributes (#2122)
Use exported strings for Semantic Attributes Co-authored-by: Trent Mick <[email protected]> Co-authored-by: Amir Blum <[email protected]> Co-authored-by: Marc Pichler <[email protected]>
1 parent 80cbee7 commit 73e01f2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/graphql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@opentelemetry/resources": "~1.0.0",
4545
"@opentelemetry/sdk-trace-base": "~1.0.0",
4646
"@opentelemetry/sdk-trace-node": "~1.0.0",
47-
"@opentelemetry/semantic-conventions": "~1.0.0",
47+
"@opentelemetry/semantic-conventions": "^1.23.0",
4848
"apollo-server": "^2.18.1",
4949
"cross-fetch": "^3.0.5",
5050
"express": "^4.17.1",

examples/graphql/tracer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ const { OTLPTraceExporter } = require('@opentelemetry/exporter-otlp-http');
88
const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
99
const { ExpressInstrumentation } = require('@opentelemetry/instrumentation-express');
1010
const { Resource } = require('@opentelemetry/resources');
11-
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
11+
const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions');
1212

1313
const provider = new NodeTracerProvider({
1414
resource: new Resource({
15-
[SemanticResourceAttributes.SERVICE_NAME]: 'graphql-service',
15+
[SEMRESATTRS_SERVICE_NAME]: 'graphql-service',
1616
}),
1717
});
1818

0 commit comments

Comments
 (0)