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

Service map with Elastic APM

Open mauriciocm9 opened this issue 2 years ago • 3 comments

Currently I've 2 lambdas that are connected with a SNS trigger. Traces from both services are arriving correctly to elastic apm using the same trace id. However services map isn't showing the connection between these 2 lambdas. After debugging the spans from the second lambda, it seems that the parent id is pointing to a X-ray subsegment generated by the lambda runtime and unreachable from the extension. After reviewing the repo, it seems that the telemetryAPI could extract these missing X-ray spans but after enabling this feature it doesn't seem to post the missing traces to elastic. This is the yml I'm using:

# Copy collector.yaml in the root directory
# Set an environment variable 'OPENTELEMETRY_COLLECTOR_CONFIG_FILE' to '/var/task/collector.yaml'
receivers:
  telemetryapi:
  otlp:
    protocols:
      grpc:
      http:

processors:
    coldstart:
 
exporters:
  logging:
    loglevel: debug
  otlp/elastic:
    # APM server https endpoint without https://
    endpoint: "${APM_SERVER_URL}"
    headers:
      # APM Server secret token
      Authorization: "Bearer ${APM_SERVER_TOKEN}"

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [logging, otlp/elastic]
    metrics:
      receivers: [otlp]
      exporters: [logging, otlp/elastic]

I build the extension from master and apparently the telemetry API seems to be working but not sending the traces: image

mauriciocm9 avatar Jan 29 '23 19:01 mauriciocm9

An update on this issue: I sent a ticket to AWS and these traces are generated by the runtime, so at the moment, there is no way to generate the service map. Apparently they will try to come up with a solution but it seems that this problem is no related with this repo.

mauriciocm9 avatar Feb 02 '23 20:02 mauriciocm9

@mauriciocm9 so these spans are not sent over the TelemetryAPI at all but they may be in the future?

tsloughter avatar Feb 02 '23 20:02 tsloughter

@mauriciocm9 so these spans are not sent over the TelemetryAPI at all but they may be in the future?

correct, I will update this response if the aws team will implement this feature or not

mauriciocm9 avatar Feb 02 '23 21:02 mauriciocm9

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

github-actions[bot] avatar May 12 '24 03:05 github-actions[bot]