-
Notifications
You must be signed in to change notification settings - Fork 25
0.10.2 Patch Release #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
0.10.2 Patch Release #453
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR prepares the main branch for the next development cycle by updating the version to 0.10.1.dev0 and updating the image version to be scanned to the latest released. This PR should only be merge when release for version v0.10.1 is success. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: github-actions <[email protected]> Co-authored-by: Steve Liu <[email protected]> Co-authored-by: Min Xia <[email protected]>
*Issue #, if available:* Currently, OpenTelemetry (OTel) metrics users in AWS Lambda must export metrics via synchronous calls. This often results in increased function duration or lost metric data, due to how Lambda handles execution lifecycle — particularly during the [freeze phase](https://serverlessfolks.com/lambda-code-execution-freezethaw#heading-freeze). *Description of changes:* This PR introduces a new ConsoleEmfExporter, which exports OTel metrics to standard output using the CloudWatch Embedded Metric Format (EMF). In the Lambda environment, logs written to standard output are automatically forwarded to CloudWatch by Lambda's built-in logging agent. This makes ConsoleEmfExporter a simple and efficient way to export OTel metrics in Lambda, avoiding the overhead and reliability issues associated with synchronous metric export. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: Jonathan Lee <[email protected]>
*Issue #, if available:* *Description of changes:* *Testing:* Lambda code: ``` import json import logging from logging import Logger, getLogger _logger: Logger = getLogger("__name__") def lambda_handler(event, context): _logger.error("helloooooo1") _logger.error("helloooooo2") _logger.error("helloooooo3") _logger.error("helloooooo4") _logger.error("helloooooo5") return { 'statusCode': 200, 'body': json.dumps('Hello from Lambda!') } ``` Env vars: ``` AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-instrument OTEL_LOGS_EXPORTER=otlp OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true ``` See that one log is in one CWLog line. <img width="2344" height="748" alt="image" src="https://github.com/user-attachments/assets/3f09900e-fad6-4f90-b9a4-a8006a5b259d" /> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
*Issue #, if available:* *Description of changes:* By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
*Description of changes:* When setting `OTEL_PYTHON_CONFIGURATOR=aws_configurator`, users see a verbose warning message: `Configuration of configurator not loaded because aws_configurator is set by OTEL_PYTHON_CONFIGURATOR` These warnings appear when multiple OpenTelemetry configurators are installed (e.g., default upstream configurators alongside the AWS configurator). While the behavior is correct, the warnings create noise in application logs. Disabling this log message from showing up by default. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
*Description of changes:* `OTEL_PYTHON_LOG_LEVEL` uses lowercase for log levels. Changing it to fix the uppercase only from this PR: #449 **Testing this on Lambda (with default Lambda config setup)**: <img width="1302" height="200" alt="image" src="https://github.com/user-attachments/assets/4b4070bf-90e6-48ae-a787-1dfee1072512" /> ``` START RequestId: 0157a3c0-c584-49bc-b5ba-fd2008335b83 Version: $LATEST END RequestId: 0157a3c0-c584-49bc-b5ba-fd2008335b83 REPORT RequestId: 0157a3c0-c584-49bc-b5ba-fd2008335b83 Duration: 230.96 ms Billed Duration: 231 ms Memory Size: 512 MB Max Memory Used: 113 MB Init Duration: 1416.80 ms XRAY TraceId: 1-689b663c-01c68093613ed19523fb9c6f SegmentId: 76d15c82545c2530 Sampled: true ``` **Testing this on Lambda (with modified Lambda config setup)**: <img width="1378" height="264" alt="image" src="https://github.com/user-attachments/assets/66a75fb5-77af-49eb-bf23-ad65a4dbdb65" /> ``` Configuration of configurator not loaded, aws_configurator already loaded START RequestId: 16d4902c-527b-4edd-86ef-abd423da365d Version: $LATEST END RequestId: 16d4902c-527b-4edd-86ef-abd423da365d REPORT RequestId: 16d4902c-527b-4edd-86ef-abd423da365d Duration: 166.12 ms Billed Duration: 167 ms Memory Size: 512 MB Max Memory Used: 113 MB Init Duration: 1467.68 ms XRAY TraceId: 1-689b6692-1ea1293937b97276187b0a71 SegmentId: d2ed420726a62b67 Sampled: true ``` See: https://opentelemetry.io/docs/zero-code/python/configuration/#logging For valid logging values. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
*Issue #, if available:* The current Lambda instrumentation is missing a call to the loggerProvider.force_flush method, which can result in delayed or missing OTel logs in the Lambda environment due to Lambda freeze *Description of changes:* Adding LoggerProvider force flush in Lambda instrumentation. Logging a debug log if the loggerProvider does not support force flush because the default global LoggerProvider is ProxyLoggerProvider in OpenTelemetry Python, will be replaced to SDKLoggerProvider only if user set environment variable `OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED = true`, which is not set in ADOT Lambda layer. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. Co-authored-by: Jonathan Lee <[email protected]>
wangzlei
approved these changes
Aug 13, 2025
jj22ee
added a commit
that referenced
this pull request
Aug 13, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
This PR Cherry-picks:
9b4905f
b6fb638
2388f5f
339e83c
fc2ef84
2a94c9a
a51b226
Testing:
git diff other/main --name-only
Result:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.