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

Allow rendering a dict of metadata on logger LogEvents from extra parameter #26043

Open
alex-statsig opened this issue Nov 20, 2024 · 0 comments
Labels
area: logging Related to Logging area: UI/UX Related to User Interface and User Experience type: feature-request

Comments

@alex-statsig
Copy link

What's the use case?

When logging, it can be convenient to dump a blob of metadata (such as several key->value pairs) with a single logline. This can make it easier to read a simple message of what happened, and separately parse some attributes of that event.

Ideas of implementation

Dagster already supports rendering some key/value attributes on events, but doesn't seem to support them for logs
Screenshot 2024-11-20 at 8 47 11 AM

There could be a well-known key in the logging extra data such as "dagster_log_metadata" which will automatically be displayed in the dagster UI in this format.

Note that displaying all the k8s attributes in the message would be very messy, but the metadata table makes this log much easier to read.

Additional information

I tried digging into the graphql and it seems like GrapheneLogsCapturedEvent could be updated to implement GrapheneDisplayableEvent and support a metadataEntries field, which it would pull from the log's dictionary. If this seems reasonable, happy to try and help contribute something.

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

@garethbrickman garethbrickman added area: logging Related to Logging area: UI/UX Related to User Interface and User Experience labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: logging Related to Logging area: UI/UX Related to User Interface and User Experience type: feature-request
Projects
None yet
Development

No branches or pull requests

2 participants