Skip to content
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

Logging: Trace ID not logged with Java 17 runtime #1501

Closed
mriccia opened this issue Nov 8, 2023 · 1 comment
Closed

Logging: Trace ID not logged with Java 17 runtime #1501

mriccia opened this issue Nov 8, 2023 · 1 comment
Assignees
Labels
bug Something isn't working priority:2 High - core feature or affects 60% of the users

Comments

@mriccia
Copy link
Contributor

mriccia commented Nov 8, 2023

The logging module checks for the presence of the XRay Trace ID, and if present, the logging module appends it in the logs.

However with Java 17 runtimes the logic used to extract the Trace ID from the _X_AMZN_TRACE_ID no longer works.

There was a change in the aws-lambda-java-libs that moved the Trace ID to a system property.

What were you trying to accomplish?

Expected Behavior

When Tracing is enabled on a Lambda function, xray_trace_id should be automatically appended in the logs

Current Behavior

With the Java 17 Lambda-provided runtime, the xray_trace_id does not appear in the logs

Possible Solution

Modify the logic used to derive the Trace ID from System Property, when the Env Var is null

Copy link

This is now released under 1.18.0 version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:2 High - core feature or affects 60% of the users
Projects
Status: Triage
Development

No branches or pull requests

2 participants