NodeSDK constructor not using defaultAttributes from NodeSDKConfiguration #3717
Labels
bug
Something isn't working
priority:p4
Bugs and spec inconsistencies which do not fall into a higher prioritization
What happened?
defaultAttributes
setting in theNodeSDK
constructor doesn't seem to do anything. Should it be there at all?Steps to Reproduce
Initialize the SDK with default attributes set, like below:
Expected Result
Provided attributes added to resulting auto-instrumented OTel Traces
Actual Result
Nothing happens
Additional Details
From the documentation and types I assumed we could set
defaultAttributes
to get extra attributes injected into the tracer. My intent is to add some attributes for searching across auto-instrumented traces. However this doesn't work because the code doesn't usedefaultAttributes
at all: https://github.com/open-telemetry/opentelemetry-js/blob/main/experimental/packages/opentelemetry-sdk-node/src/sdk.ts#L90Generally speaking, there doesn't seem to be any other plumbing for this that I could see in the SDK. Is the
defaultAttributes
functionality supposed to work? Or is there another way to do this?OpenTelemetry Setup Code
package.json
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: