opentelemetry-lambda icon indicating copy to clipboard operation
opentelemetry-lambda copied to clipboard

Otel Collector does not support metric receiver although docs advertise that it does.

Open bhaskarbanerjee opened this issue 1 year ago • 2 comments

Describe the bug OTel Lambda Collector docs say that the collector extension allows lambdas to use the OpenTelemetry Collector Exporter to send traces and metrics to any configured backend while Telemetry API Receiver document says.

The receiver is configured only for traces as seen here

Is this a miss or intentional? And why is it advertised like it is, if this is intentional.

I do see a PR in progress to add support for Logs

Steps to reproduce Added python proto layer. Added otel collector layer. There is manual instrumentation of custom metrics from the lambda code. config.yaml looks like:

receivers:
  otlp:
    protocols:
      http:
 
exporters:
  logging:
    loglevel: debug
  otlp:
    endpoint: enterprise.otelcollector.gateway.com
 
service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [logging, otlp]
    metrics:
      receivers: [otlp]
      exporters: [logging, otlp]

processors:
  batch:
    send_batch_max_size: 100
    send_batch_size: 10
    timeout: 2s

What did you expect to see? Per the documentation, we expected it to work for both traces and metrics (custom metrics)

What did you see instead? Only traces were exported and collector threw clear error on endpoint /v1/metrics saying it has reached max number of retries.

What version of collector SDK version did you use? Version

What language layer did you use? Python

Additional context No

bhaskarbanerjee avatar Jul 12 '24 12:07 bhaskarbanerjee

@tylerbenson @nslaughter can you please help on my above query?

bhaskarbanerjee avatar Jul 12 '24 15:07 bhaskarbanerjee

I'm a bit confused,

threw clear error on endpoint /v1/metrics saying it has reached max number of retries.

This indicates that enterprise.otelcollector.gateway.com does not have an metrics pipeline with an OTLP receiver and that the lambda layer is trying to export the metrics.

One simple way to verify this is the case is to only have the logging exporter in the collector lambda configuration metrics pipeline and then verify in the logs that the metrics are being generated.

rapphil avatar Jul 22 '24 18:07 rapphil

This issue was marked stale. It will be closed in 30 days without additional activity.

github-actions[bot] avatar Jul 23 '25 03:07 github-actions[bot]

Closed as inactive. Feel free to reopen if this issue is still relevant.

github-actions[bot] avatar Aug 23 '25 03:08 github-actions[bot]