You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @sarwaan001, I see that you set the flush timeout to 900 ms and I think his might not be enough (for functions will small memory limit) on coldstart because total flush timeout is shared between traces first and then metrics.
Are you still seeing missing metrics with higher flush timeout configs?
And also I couldn't see your collector layer ARN. Are you exporting to the collector outside?
Describe the bug
OTEL Python Layer does not always flush metrics at the end of lambda invocation.
Steps to reproduce
handler.py
config.yaml
Ensure that the following configuration for the lambda is set:
-- AWS_LAMBDA_EXEC_WRAPPER: /opt/otel-instrument
-- OPENTELEMETRY_COLLECTOR_CONFIG_FILE: /var/task/config.yaml
-- OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT: 900
-- OTEL_NAMESPACE: SampleNamespace
-- OTEL_PROPAGATORS: xray
-- OTEL_PYTHON_ID_GENERATOR: xray
Ensure the lamdba has the following permissions:
test.py
ensure you have boto3 installed
What did you expect to see?
There should be 100 values in cloudwatch. pytest should pass
What did you see instead?
Less than 100 values sent to cloudwatch, sometimes 100 on warm lambdas and the test passes.
What version of collector/language SDK version did you use?
arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-python-amd64-ver-1-18-0:1
What language layer did you use?
Python
Additional context
I believe that sometimes the lambda layer does not flush emf metrics before the lambda freezes.
The text was updated successfully, but these errors were encountered: