-
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/transform] Add 'transform.flatten.logs' feature gate #33338
[processor/transform] Add 'transform.flatten.logs' feature gate #33338
Conversation
3b4063d
to
3dc405f
Compare
I'd advocate for adding in a config option in addition to the feature flag; I think it can help with slowly migrating configs over to this option if needed for more complex configurations. In addition, I think in some scenarios where you don't need the flattened representation, it would be nice to avoid the overhead of having to flatten/unflatten. It also makes it easier to swap between the hierarchy and flattened representation for agents managed by OpAMP (feature flags are currently treated as static and not configurable through OpAMP, at least in the current supervisor design). |
3dc405f
to
6033636
Compare
23d0b3f
to
9289d9c
Compare
component: processor/transform | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Add `transform.flatten.logs` featuregate to give each log record a distinct resource and scope. |
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.
Should we add a note here as well that the config option is also required to enable this? It may be clear enough from the README, so just a suggestion.
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.
I think a note about the config option would also be good in the subtext, just so users hopefully have enough info to use the feature from the changelog entry.
Co-authored-by: Curtis Robert <crobert@splunk.com>
9c8ab4c
to
f433e36
Compare
@djaglowski Can you add a benchmark test for this feature? I know we need it in order to produce the right outcomes for certain scenarios, but I want to be able to claim it is performant when used. |
I added a simple pair of benchmarks, one with and the other without the flatten option. It's definitely a performance hit but seems reasonable to me for when correctness is needed. Results on my machine:
|
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.
Thanks for adding the tests!
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.
Looks good to me. I think the feature gate is sufficient to get this in despite the early state of the functionality.
component: processor/transform | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Add `transform.flatten.logs` featuregate to give each log record a distinct resource and scope. |
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.
I think a note about the config option would also be good in the subtext, just so users hopefully have enough info to use the feature from the changelog entry.
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
This PR proposes a feature gate which would enable the Flatten/Unflatten behavior described here.
This was discussed in the Collector SIG recently and it was mentioned that a feature gate would be a reasonable way to implement this.
One immediate question: Should this be purely a feature gate, or should there be a config option on the processor which fails
Validate
if the feature gate is not set?