-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[collectd 6] Add an option to configure resource attributes. #4199
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.
Code changes look fine. But I think documentation needs some improvements:
- Name is too generic, so some short explanation how this "Resource" differs from all the other "Resource" items already mentioned in the document, would be good
- Text is on the abstract side and IMHO would need some example of how it changes collectd output, so users unfamiliar with OpenTelemetry know what it's about
There should be also |
That issue is now fixed, but need for disabling the resource labels has gone nowhere, because they just duplicate information that Prometheus already adds to the metrics. EDIT: there may also be other write plugins / things reading them, that resource labels could have broken. |
My thinking was that the following config should give you the same effect as a
Can you tell me more how the resource attributes and the Prometheus export clash? It's important to me to get this right. |
True, and it's a useful feature, but I'm assuming that you're going to be adding more attributes in the future?
Problem is that extra labels (on every metric) can noticeably increase Prometheus resource usage in larger clusters, so it's important that one can easily disable anything that is not needed, especially when Prometheus already provides corresponding information in (more relevant kubernetes namespace) labels. EDIT: other telemetry systems ingesting labels are likely to be impacted too, not just Prometheus. |
My design idea is this:
I think you're coming from a position where these labels cause problems with the write_prometheus plugin. Once these are properly integrated (I'm working on this in #4213) I think that the existing
Gotcha, thanks for the info! IMHO you have two options already:
I'm sure collectd will gain additional features in the future, but we have to start somewhere, and this seems like quite a good position to be in for a first step. |
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.
Ok, seems reasonable, especially considering #4213.
Mostly to avoid an uninformed compiler warning ;)
Since `configfile` now refers to `resource`, this needs to be linked into tests.
To achieve this, track whether or not the struct has been initialized separately, so that users can remove all the attributes if they wish.
ChangeLog: daemon: The new "Resource" option allows users to configure resource attributes manually if desired.