Skip to content

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

Closed
@mriccia

Description

@mriccia

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpriority:2High - core feature or affects 60% of the users

Type

No type

Projects

Status

Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions