-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[processor/logdedup] Use a specific field as deduplication key #36965
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Makes sense to me. |
I suggest we use ottl style references to fields: |
@djaglowski Do you have any resources on how to evaluate the OTTL string from the field? I'm struggling to follow up on this part. For example, I have a LogRecord and an OTTL string like |
I discussed this privately with @VihasMakwana, and he brought up some interesting points. Since we only care about the value of the field, using OTTL might be overkill. A syntax similar to exclude_fields could be both more familiar to end users and simpler to implement. |
Also, simple syntax such as opentelemetry-collector-contrib/processor/logdedupprocessor/field_remover.go Lines 33 to 53 in 49b729d
What do you think @djaglowski ? |
Component(s)
processor/logdedup
Is your feature request related to a problem? Please describe.
Currently the processor uses the entire log message as the deduplication key, allowing the user to remove certain fields from being considered during the hashing part via the
exclude_fields
option.One scenario that is not covered is that the deduplication key could be already present as a body or attribute in the log message. You could exclude the other body and attributes via exclude_fields, but this negative match is very error prone and does not scale well.
Describe the solution you'd like
I propose we add a new option to use a certain LogRecord field as deduplication key. This option accepts ottl style path variables:
Describe alternatives you've considered
Simpler syntax similar to
exclude_fields
, not ottl needed since we only care about the field value.Additional context
No response
The text was updated successfully, but these errors were encountered: