Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[processor/resourcedetection] AWS Lambda faas.instance and aws.log.* attributes not set #31359

Open
cheempz opened this issue Feb 21, 2024 · 2 comments
Labels
bug Something isn't working needs triage New item requiring triage processor/resourcedetection Resource detection processor Stale

Comments

@cheempz
Copy link

cheempz commented Feb 21, 2024

Component(s)

processor/resourcedetection

What happened?

Description

We are running OpenTelemetry Collector Lambda Extension for AWS Lambda version 0.91.0, configured with the resourcedetection processor where the lambda detector is included. It is correctly setting the attributes except for these:

  • faas.instance ($AWS_LAMBDA_LOG_STREAM_NAME)
  • aws.log.group.names ($AWS_LAMBDA_LOG_GROUP_NAME)
  • aws.log.stream.names ($AWS_LAMBDA_LOG_STREAM_NAME)

Looking closer, we found the otelcol extension does not have the AWS_LAMBDA_LOG_GROUP_NAME and AWS_LAMBDA_LOG_STREAM_NAME environment variables available, which is confirmed by AWS docs:

Environment variables: Extensions can access the function's environment variables, except for the following variables that are specific to the runtime process:

AWS_EXECUTION_ENV
AWS_LAMBDA_LOG_GROUP_NAME
AWS_LAMBDA_LOG_STREAM_NAME
AWS_XRAY_CONTEXT_MISSIN
AWS_XRAY_DAEMON_ADDRES
LAMBDA_RUNTIME_DIR
LAMBDA_TASK_ROOT
_AWS_XRAY_DAEMON_ADDRES
_AWS_XRAY_DAEMON_PORT
_HANDLER

Steps to Reproduce

Install the otelcol extension in an AWS Lambda function, exporting telemetry to any backend that allows examining the exported data.

Expected Result

Exported telemetry has Resource Attributes faas.instance, aws.log.group.names, aws.log.stream.names.

Actual Result

Exported telemetry does not have those three attributes.

Collector version

OpenTelemetry Collector Lambda Extension for AWS Lambda 0.91.0

Environment information

Environment

AWS Lambda function (any runtime)

OpenTelemetry Collector configuration

processors:
  decouple:
  resourcedetection:
    detectors: [env, system, lambda]
    timeout: 0.2s
    override: false

Log output

No response

Additional context

No response

@cheempz cheempz added bug Something isn't working needs triage New item requiring triage labels Feb 21, 2024
@github-actions github-actions bot added the processor/resourcedetection Resource detection processor label Feb 21, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage processor/resourcedetection Resource detection processor Stale
Projects
None yet
Development

No branches or pull requests

1 participant