generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 67
Configure EMF and CompactLog Exporters for Lambda Environment
#1222
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
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
…eader, and consolidated unit tests
EMF and CompactLog Exporters for Lambda Environment EMF and CompactLog Exporters for Lambda Environment
wangzlei
approved these changes
Oct 3, 2025
wangzlei
previously approved these changes
Dec 4, 2025
wangzlei
approved these changes
Dec 5, 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.
Description of changes:
Java version of these PRs:
This PR introduces Console EMF exporter and Compact Console logs exporter and enabling them for Lambda environments, allowing all forms of telemetry to be emitted directly to CloudWatch for users who've installed the Application Signals lambda layer.
To enable the Compact Console logs exporter, users must set the following environment variables in their Lambda:
OTEL_LOGS_EXPORTER:consolerequiredTo enable the Console EMF exporter, users must set the following environment variables in their Lambda:
OTEL_METRICS_EXPORTER:awsemfrequiredOTEL_EXPORTER_OTLP_LOGS_HEADERS:x-aws-log-group=your-log-group,x-aws-log-stream=your-log-stream,x-aws-metric-namespaceoptionalEnabling the console exporters for EMF and logs will store the user's OTel metrics and logs directly in their Lambda log group.
Note 1: if users would like to store their EMF logs to a separate log group, they MUST* set this configuration
OTEL_EXPORTER_OTLP_LOGS_HEADERS:x-aws-log-group=your-log-group,x-aws-log-stream=your-log-streamNote 2:
x-aws-metric-namespacewill usedefaultif it is not setTesting:
Manual end to end testing with a custom built Lambda layer using the sample app configured with the following environment variables in Lambda environment:

EMF translated OTel metrics and OTel logs:


OTel log:
EMF log
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.