-
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
[receiver/prometheus] Add config option to allow dropping of untyped metrics #16768
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Pinging code owners for receiver/prometheus: @Aneurysm9 @dashpole. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This sounds reasonable to me. Also related is open-telemetry/prometheus-interoperability-spec#69, which would try to preserve the notion that the metric type was unknown. |
Do you have enough bandwidth to add this config? @dashpole |
I am trying to get more familiar with the code base of the Prometheus components. I'd be happy to work on this issue. Do we want to address this issue with the config option or preserve the notion of unknown type in metric attributes? |
I think preserving the notion of unknown would be better, but is definitely less straightforward. If we choose to try and preserve the notion of unknown, we should probably make changes to the conversion spec here before moving forward with the implementation.
Not at the moment. |
Would memory overhead be also be a consideration for adding an additional attribute for every metric for all consumers of the receiver? Perhaps that should also be opt-in via a config option? Something along the lines of:
Also, one more option is to have ability to both drop untyped metrics and add this additional attribute - not sure if thats an overkill. |
I would expect only unknown-typed metrics to get an additional attribute. Metrics with a type should be left unmodified. |
Would it be better to not converting to Gauge but instead converting to
|
We discussed using
Thats because there isn't such a type to reference today :). The prometheus, prometheusremotewrite, and googlemanagedprometheus exporters would make use of such a type if it existed. I'm not sure what you mean about corrupting data. At the time, Gauge seemed like the least bad option, but I can understand that being confusing in some cases.
Where does the prometheus receiver set that resource attribute, though?
A single, non-identifying attribute on a (hopefully) small number of metrics shouldn't make much of a difference in terms of increased resource usage. My bigger hesitation is that looking for a particular attribute it seems like poor contract for exporters. Something like a data point flag feels like a better fit... |
+1 I think a data point flag would be the ideal representation of that information. I'm not sure whether it would have any applicability outside of this use case, though, which may lead to resistance to including a new flag in the spec. |
Hi @kovrus, |
I am working on it. Please assign to me this issue though ! Will have the PR by the end of the day |
@khanhntd thanks for your contribution! |
Thanks @fatsheep9146 for the recommandation. Yes that is my next TODO (as mentioned in PR). I'm fine with updating the spec first too . |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Component(s)
receiver/prometheus
Is your feature request related to a problem? Please describe.
As a result of open-telemetry/opentelemetry-collector#1103, currently, all untyped metrics are converted to gauges and there is no way to determine later on in the pipeline if a metric was originally untyped.
While converting to gauge might be ok in most cases, there could be scenarios when customers instead choose to drop all untyped metrics (for example to filter out any go internal
scrape_
metrics).Describe the solution you'd like
Add a config option that would allow customers to specify if they would like untyped metrics to be dropped.
Describe alternatives you've considered
An alternative could be to introduce a label on the metric to capture the "original" metric type thus allowing customers to then have some sort of a filter processor to drop metrics if needed.
Additional context
No response
The text was updated successfully, but these errors were encountered: