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 7
7
import { Span , context , diag } from "@opentelemetry/api" ;
8
8
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto" ;
9
9
import { Resource } from "@opentelemetry/resources" ;
10
- import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions" ;
10
+ import { SEMRESATTRS_SERVICE_NAME } from "@opentelemetry/semantic-conventions" ;
11
11
import { Instrumentation } from "@opentelemetry/instrumentation" ;
12
12
import { InitializeOptions } from "../interfaces" ;
13
13
import { ASSOCATION_PROPERTIES_KEY , WORKFLOW_NAME_KEY } from "./tracing" ;
@@ -291,9 +291,10 @@ export const startTracing = (options: InitializeOptions) => {
291
291
292
292
_sdk = new NodeSDK ( {
293
293
resource : new Resource ( {
294
- [ SemanticResourceAttributes . SERVICE_NAME ] : options . appName ,
294
+ [ SEMRESATTRS_SERVICE_NAME ] :
295
+ options . appName || process . env . npm_package_name ,
295
296
} ) ,
296
- spanProcessor : _spanProcessor ,
297
+ spanProcessors : [ _spanProcessor ] ,
297
298
traceExporter,
298
299
instrumentations,
299
300
// We should re-consider removing unrelevant spans here in the future
You can’t perform that action at this time.
0 commit comments