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

Deterministic UUID option for PatternLayout #3532

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

kazariad
Copy link

Draft implementation of a deterministic UUID generator based on a LogEvent hash. Would enable Appenders to produce repeatable UUIDs for the same LogEvent and correlate log outputs.

Discussion

@vy vy self-assigned this Mar 13, 2025
@vy vy added the layouts Affects one or more Layout plugins label Mar 13, 2025
Copy link
Contributor

@ppkarwasz ppkarwasz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kazariad,

In general this looks fine to me, thanks!
A couple of notes:

Copy link

github-actions bot commented Mar 14, 2025

Job Requested goals Build Tool Version Build Outcome Build Scan®
build-macos-latest clean install 3.9.8 Build Scan PUBLISHED
build-ubuntu-latest clean install 3.9.8 Build Scan PUBLISHED
build-windows-latest clean install 3.9.8 Build Scan PUBLISHED
Generated by gradle/develocity-actions

@kazariad
Copy link
Author

Thanks for your feedback, @ppkarwasz. I was originally using a SecureRandom to comply with the UUID guidelines for using crypto-secure RNG, but I've experimented and decided to switch to a straightforward murmurhash of the LogEvent fields instead. It's also formatted as a UUID v8 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
layouts Affects one or more Layout plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants