-
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/k8sattributes] allow metadata extractions to be empty list #27185
[processor/k8sattributes] allow metadata extractions to be empty list #27185
Conversation
Signed-off-by: Ziqi Zhao <[email protected]>
if len(fields) == 0 { | ||
fields = enabledAttributes() | ||
} |
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.
@fatsheep9146 given that your fix in core is merged, we can move this part to createDefaultConfig
and don't do anything else. Users will be able to set metadata: []
which I believe is more correct way than setting null
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.
That make senses, I will modify like that.
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.
After modify like this, user should set []
, null
is not supported, since the null should override the default values.
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.
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 test this locally and make sure, for now only setting metadata
to []
works, setting to null
will keep the default values
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 test this locally and make sure, for now only setting metadata to [] works, setting to null will keep the default values
This behavior makes total sense. We don't need to support null
additionally for this
Signed-off-by: Ziqi Zhao <[email protected]>
Signed-off-by: Ziqi Zhao <[email protected]>
Co-authored-by: Dmitrii Anoshin <[email protected]>
…open-telemetry#27185) **Description:** Allow metadata extractions to be empty list After this is merged, user is allow to specify the metadata to be empty list like following ``` processors: k8sattributes: extract: annotations: - from: pod key: workload tag_name: k8s.annotations.workload labels: - from: pod key: app tag_name: k8s.labels.app metadata: [] ``` **Link to tracking Issue:** fix open-telemetry#14452 --------- Signed-off-by: Ziqi Zhao <[email protected]> Co-authored-by: Dmitrii Anoshin <[email protected]>
Description:
Allow metadata extractions to be null
After this is merged, user is allow to specify the metadata to be null like following
and the trace is like
Link to tracking Issue:
fix #14452
Testing:
Documentation: