Skip to content

Telemetryapi receiver not respecting OTEL_RESOURCE_ATTRIBUTES env var #2047

@jousby

Description

@jousby

Describe the bug
Similar to #1851, it looks like the telemetryapi receiver is not picking up the additional resource attributes set in the OTEL_RESOURCE_ATTRIBUTES env variable.

Steps to reproduce

  • Create and instrument a Lambda function
  • Set the OTEL_RESOURCE_ATTRIBUTES environment variable with some key/values to put on each log statement i.e
    • OTEL_RESOURCE_ATTRIBUTES: 'deployment.environment.name=dev'
  • Enable telemetryapi receiver for logs and traces
  • Send logs to your OTEL backend of choice and check for the presence of the additional resource attributes

What did you expect to see?
I expected to see the 'deployment.environment.name' attribute in log statements

What did you see instead?
The values in OTEL_RESOURCE_ATTRIBUTES are missing from log statements

What version of collector/language SDK version did you use?

  • 0.19.0 (collector layer)
  • 0.18.0 (nodejs layer)

What language layer did you use?
javascript

Additional context
The fix looks like it might be very similar to the fix for #1851 => explicitly read the env var and add the key/values to the resource map.

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggoPull requests that update Go code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions