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

OTel Lambda Error: failed to force a flush

Open droger88 opened this issue 1 year ago • 0 comments

Describe the bug We are using lambda golang with provided.al2 runtime. The collector starts without any problem however getting following error when collector tries to flush.

OTel Lambda Error: failed to force a flush, lambda may freeze before instrumentation exported:  traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake"

We are trying to send the data to newrelic, the errors seem to complain about the tls connection, not sure if this is something wrong the collector configuration or from the newrelic perspective.

Steps to reproduce Collector configuration

receivers:
  otlp:
    protocols:
      grpc:
        # endpoint: 'http://localhost:4317'
      http:
        # endpoint: 'http://localhost:4318'

exporters:
  debug:
    verbosity: detailed
  otlphttp:
    endpoint: ${NEW_RELIC_OPENTELEMETRY_ENDPOINT}
    headers:
      api-key: ${NEW_RELIC_LICENSE_KEY}
service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [debug, otlphttp]
    metrics:
      receivers: [otlp]
      exporters: [debug, otlphttp]
    # logs:
    #   receivers: [otlp]
    #   exporters: [otlp]

What did you expect to see? Metrics are successfully sent to newrelic

What did you see instead? collector seems timeout when sending data to exporter

What version of collector/language SDK version did you use? Layer version:arn:aws:lambda:ca-central-1:184161586896:layer:opentelemetry-collector-amd64-0_11_0:1

What language layer did you use? amd64

droger88 avatar Oct 08 '24 13:10 droger88