-
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
Remove dataType field of query metricset #17383
Conversation
Signed-off-by: chrismark <[email protected]>
Pinging @elastic/integrations-platforms (Team:Platforms) |
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.
Can we put it somewhere else? This is not exactly a label. it would be prometheus.datatype
for instance.
Also I wonder if we really need to store this, what's the benefit?
The logic of adding this as a label is to follow the Prometheus approach of storing only numbers under metrics and everything that is string to be added as label.
The only benefit I see is for the users to be able to better watch the types of the queries they have. I have no strong preference in keeping this, we can discard it. |
+1 to remove it until we find a use case for it. We can always add it afterwards |
Signed-off-by: chrismark <[email protected]>
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.
ResultType
defined in structs can be removed as well? For example: https://github.com/elastic/beats/blob/master/metricbeat/module/prometheus/query/data.go#L48 and https://github.com/elastic/beats/blob/master/metricbeat/module/prometheus/query/data.go#L66
Good catch @kaiyan-sheng , thanks! |
Signed-off-by: chrismark <[email protected]>
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.
LGMT! Thanks!
(cherry picked from commit 495595d)
(cherry picked from commit 495595d)
(cherry picked from commit deba29e)
What does this PR do?
This PRs moves
prometheus.query.dataType
field toprometheus.labels.dataType
.Why is it important?
prometheus.query.dataType
is of type string however the mapping ofprometheus.query.*
is for float values (and actually is used to store metrics). This makes it unable to index events in Elasticsearch. Hence,prometheus.query.dataType
should be moved under labels which are mapped as strings.closes #17401