Open arun-annamalai opened 5 months ago
Related to #787, I believe
What you could do it act on the SIGTERM
signal instead of adding a sleep, an example on how to use that can be found here: https://github.com/aws-samples/graceful-shutdown-with-aws-lambda/tree/main/java-demo
ah I see, is there a way to force flush all spans from the collector given the SIGTERM signal? Because from the applications side, it seems that all spans are exported to the collector
This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled
name: Bug report about: Create a report to help us improve title: 'ADOT Collector Dropping Exports in Lambda Environment' labels: bug assignees: ''
Describe the bug A clear and concise description of what the bug is. I have a manually instrumented Java Lambda with the ADOT otel lambda layer. I have the following setup
Java SDK -> ADOT Collector -> OpenSearch exporter -> OpenSearch Ingestion Pipeline
I expect to see all my spans being exported by the collector to the open search ingestion pipeline, but it appears the collector is being shutdown right after the function ends and I have seen around a 30% ratio in which the last span does not get exported.
I get the error
Steps to reproduce If possible, provide a recipe for reproducing the error.
What did you expect to see? A clear and concise description of what you expected to see. I expect to see all spans being exported to the oltphttp endpoint of the open search ingestion pipeline.
What did you see instead? A clear and concise description of what you saw instead. I saw the last span being dropped.
What version of collector/language SDK version did you use? Version: (e.g.,
v0.58.0
,v1.11.0
, etc) Collector Lambda Layer: arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-collector-arm64-ver-0-90-1:1What language layer did you use? Config: (e.g.,
Java
,Python
, etc) JavaCloudwatch Logs log-events-viewer-result.csv
Collector Config
Additional context Adding a 1 second sleep before my lambda exits solves the problem, but shouldnt the lambda environment design make sure to flush all spans within the collector before the collector shuts down?