File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/traceloop-sdk/src/lib/tracing Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 77import { Span , context , diag } from "@opentelemetry/api" ;
88import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto" ;
99import { Resource } from "@opentelemetry/resources" ;
10- import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions" ;
10+ import { SEMRESATTRS_SERVICE_NAME } from "@opentelemetry/semantic-conventions" ;
1111import { Instrumentation } from "@opentelemetry/instrumentation" ;
1212import { InitializeOptions } from "../interfaces" ;
1313import { ASSOCATION_PROPERTIES_KEY , WORKFLOW_NAME_KEY } from "./tracing" ;
@@ -291,9 +291,10 @@ export const startTracing = (options: InitializeOptions) => {
291291
292292 _sdk = new NodeSDK ( {
293293 resource : new Resource ( {
294- [ SemanticResourceAttributes . SERVICE_NAME ] : options . appName ,
294+ [ SEMRESATTRS_SERVICE_NAME ] :
295+ options . appName || process . env . npm_package_name ,
295296 } ) ,
296- spanProcessor : _spanProcessor ,
297+ spanProcessors : [ _spanProcessor ] ,
297298 traceExporter,
298299 instrumentations,
299300 // We should re-consider removing unrelevant spans here in the future
You can’t perform that action at this time.
0 commit comments