-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Use default metricsets in hints based autodiscover #6634
Conversation
I've opened #6636 to still support the now unhardcoded Prometheus use case |
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.
+1 on the feature. The only worry I have is about the experimental and beta metricsets but our discussion about the defaults should solve this before a release.
Could you also add a note about the defaults to the docs?
// fallback to all metricsets if module has no defaults | ||
msets, err = m.Registry.DefaultMetricSets(module) | ||
if err != nil || len(msets) == 0 { | ||
msets = m.Registry.MetricSets(module) |
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 worry that with that we enable experimental metricsets which is probably not our intention.
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.
Could we exclude experimental metricsets from defaults? Is there an alternative way to explicitly enable metricsets from hints?
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.
Do we agree to set default metricsets for all modules? If that's the case this is not a issue
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.
yes, we do. but if we merge this we should make sure then that we follow up with the changes until the next release.
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.
Well, having that this feature is experimental... we could probably live with experimental metricsets being spawned here 😇
"enabled": true, | ||
}, | ||
}, | ||
// Only module, it should return defaults |
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.
Instead of a comment here you could add this as message
or description
to the test and output it when the test fails. This makes hunting down a failing test much easier. We have that already in quite a few other places.
Tests and docs updated |
When using hints in Metricbeat, follow this pattern: - If `metricsets` hint is given, use it - If not, use module default metricsets - If no default metricsets, use all module metricsets
f3de048
to
3bd95df
Compare
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.
WFG
When using hints in Metricbeat, follow this pattern:
metricsets
hint is given, use it