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

Patterns in lables #56

Closed
paradoxxl opened this issue Jun 22, 2021 · 4 comments · Fixed by #62
Closed

Patterns in lables #56

paradoxxl opened this issue Jun 22, 2021 · 4 comments · Fixed by #62

Comments

@paradoxxl
Copy link

It is possible to use pattens such as %C{1.} as values in labels which are then dynamically resolved?

@tkowalcz
Copy link
Owner

Right now it is not possible. Only MDC lookups ${ctx:} are supported. There are two reasons:

  1. Tjahzi is performance oriented so I want to make sure every feature like the is implemented with no allocations.
  2. Loki does not like high cardinality labels so I did not consider dynamically generated labels to be an important feature.

If you have some specific patterns you would like me to support then please list them but I can't promise when that will happen.

@paradoxxl
Copy link
Author

Thank you for clarification. This seems quite reasonable.

For logging monolithic applications, the origin of the message could be an equivalent of using something like an 'app'-label for a distributed application. Therefore, class or logger could be quite valuable label for improving search performance.

What do you think about this?

@tkowalcz
Copy link
Owner

It sounds very reasonable. I'll take a look and will keep you posted.

@tkowalcz tkowalcz linked a pull request Jul 10, 2021 that will close this issue
@tkowalcz
Copy link
Owner

Newest release 0.9.13 uses PatternLayout to implement dynamic label value generation.

I have marked it as pre release until I have some prod deployments with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants