Skip to content

Feature request: Change powertools lambda context capture log key order #3091

@WtfJoke

Description

@WtfJoke

Use case

We were in the process of enabling the capturing of the lambda context in our logger.

Although we like the additional context, we didnt enable it because the actual logged message is only visible anymore when expanding the log message which makes it almost impossible to skim through log-message and spot the one which looks interesting because they all look the same in the x-ray-tracing-view and I would be forced to scroll sideways.

See this screenshot for reference:
image

Solution/User Experience

Is it possible for you to change the order of the logging keys exposed from capturing the lambda context and put it to the end by default (or after the message)?

Alternative solutions

Since v2.8.0 its also possible to define log key order on their own, see here: https://docs.powertools.aws.dev/lambda/typescript/latest/core/logger/#reordering-log-keys-position

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityloggerThis item relates to the Logger Utility

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions