Skip to content

Commit f0edaba

Browse files
authored
chore: don't use deprecated otel semantic resource attributes exports (#326)
1 parent 691b39e commit f0edaba

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/run/handlers/tracing.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'
22
import { Resource } from '@opentelemetry/resources'
33
import { NodeSDK } from '@opentelemetry/sdk-node'
44
import { SimpleSpanProcessor } from '@opentelemetry/sdk-trace-node'
5-
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'
5+
import {
6+
SEMRESATTRS_SERVICE_NAME,
7+
SEMRESATTRS_SERVICE_VERSION,
8+
} from '@opentelemetry/semantic-conventions'
69

710
const {
811
default: { version, name },
912
} = await import('../../../package.json')
1013

1114
const sdk = new NodeSDK({
1215
resource: new Resource({
13-
[SemanticResourceAttributes.SERVICE_NAME]: name,
14-
[SemanticResourceAttributes.SERVICE_VERSION]: version,
16+
[SEMRESATTRS_SERVICE_NAME]: name,
17+
[SEMRESATTRS_SERVICE_VERSION]: version,
1518
}),
1619
spanProcessor: new SimpleSpanProcessor(
1720
new OTLPTraceExporter({

0 commit comments

Comments
 (0)