open-telemetry / open-telemetry/opentelemetry-lambda
Telemetryapi receiver not respecting OTEL_RESOURCE_ATTRIBUTES env var
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 432
- Forks
- 246
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 47
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the telemetryapi receiver and compare its resource handling with the fix described in issue #1851. Reproduce the Lambda setup with OTEL_RESOURCE_ATTRIBUTES set to deployment.environment.name=dev, then verify that the attribute appears on exported logs and traces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, javascript
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100