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

MDC-style properties, in addition to traceId #47

Open
stolsvik opened this issue Oct 28, 2021 · 0 comments
Open

MDC-style properties, in addition to traceId #47

stolsvik opened this issue Oct 28, 2021 · 0 comments
Labels
thoughts Issues describing some thoughts around a subject

Comments

@stolsvik
Copy link
Contributor

stolsvik commented Oct 28, 2021

Ability for an initiation, and during the stages, to add more key-value pairs that will follow the flow. Very much like TraceProperties, but is specifically meant like the logger MDC: In addition to a informative traceId, you could add specific values like "customerId"="12345" for any initiation that relates to that customer. The "MDC labels" would be picked up and set on the actual Logger MDC. That way, you could much more easily hunt for log lines referring to this customerId.

Edit 2023-05-26: With the new io.mats3.util.TraceId tool, you can ensure that "TraceId properties" have a standardized way of being presented. This again make it much simpler to let your logging system parse them out and add them to the log document (using Elastic nomenclature), so that they can be searched for.
However, this still precludes adding more properties as you find them through the flow, as the traceId can per its nature only contain information you have at initiation time.

@stolsvik stolsvik added the thoughts Issues describing some thoughts around a subject label Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
thoughts Issues describing some thoughts around a subject
Projects
None yet
Development

No branches or pull requests

1 participant