-
Notifications
You must be signed in to change notification settings - Fork 3.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
feat(operator)!: Add configuration option for dropping OTLP attributes #15857
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still have to test but overall lgtm. Good job 🙌
Small nit comment regarding the use of errList = append(errList, ...)
. Sometimes we use this with just an error where other times with a function call. Although this makes the code more compact I feel that sometimes it makes it a bit harder to follow. Maybe moving instances with function calls to an if and only appending to errList if the result yields a list of errors. This is just a suggestion feel free to ignore if you feel it will not improve the code maintenance.
What this PR does / why we need it:
The Loki Operator already supports configuring whether to store OTLP attributes as stream labels or structured metadata, but the option to drop attributes was omitted from the LokiStack API, because of a misunderstanding that "drop" is the default behavior (the actual default behavior is "structured metadata".
This PR adds the
drop
capability to the LokiStack API as well.Which issue(s) this PR fixes:
Fixes LOG-6507.
Special notes for your reviewer:
StructuredMetadata
attribute of the LokiStack (instead of just deprecating it). I think it's still a source of confusion for the user and removing it would also reduce the code needed in the operator quite a bit (mostly validation). This would be a breaking change though.Checklist
CONTRIBUTING.md
guide (required)