opentelemetry-lambda
opentelemetry-lambda copied to clipboard
Service map with Elastic APM
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:
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 so these spans are not sent over the TelemetryAPI at all but they may be in the future?
@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
This issue was marked stale. It will be closed in 30 days without additional activity.