aws-otel-lambda icon indicating copy to clipboard operation
aws-otel-lambda copied to clipboard

Fails with Usage of managed Lambda Layer

Open Conklin-Spencer-bah opened this issue 1 year ago • 0 comments

Describe the bug

When using the managed ADOT lambda layer config files are not initialized even though they are present in the location specified (packaged with lambda). I know this is the case because if I switch to the upstream OTEL lambda layer the loading of the configuration file works.

Furthermore it looks like OTEL is working because if you check in x-ray you can see traces. However you don't see the Span / Trace that I created. I presume this is because the x-ray export is failing to load as per the log below.

Propagator "xray" requested through environment variable is unavailable. Failed extracting version /var/task Name: collector State: Ready Events: [SHUTDOWN, INVOKE]

Steps to reproduce Use managed adot layer: arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-18-1:4

Set env vars in lambda: AWS_LAMBDA_EXEC_WRAPPER: '/opt/otel-handler' OPENTELEMETRY_COLLECTOR_CONFIG_FILE: '/var/task/config.yaml'

Create config file

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "localhost:4317"
      http:
        endpoint: "localhost:4318"

exporters:
  logging:
  awsxray:

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [awsxray]
    metrics:
      receivers: [otlp]
      exporters: [logging]
  telemetry:
    metrics:
      address: localhost:8888

Instrument a Span/ Tracer.

What did you expect to see? My defined traces and spans.

What did you see instead? Only default x-ray traces.

What version of collector/language SDK version did you use? Version: latest

What language layer did you use? NodeJS

Additional context Add any other context about the problem here.

Conklin-Spencer-bah avatar Oct 08 '24 14:10 Conklin-Spencer-bah