-
Notifications
You must be signed in to change notification settings - Fork 331
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
Metric names between OpenCensus & Prometheus exporters are different #2174
Comments
From @pianohacker re: prepending a domain prefix for prometheus https://knative.slack.com/archives/CEPGNPHP1/p1624558123099100
|
cc @evankanderson who reviewed the OpenCensus exporter changes |
Regarding Prometheus this is what I read and what we have does not seem to be a violation of the recommendations unless I misread something:
I am not sure what value the domain adds here we already use the component name as the prefix and we know the domain for each component, it is straightforward for the control plane ones eg. Serving, Eventing. |
@skonto @evankanderson during the operation wg meeting mentioned you wrote a doc about stable metric names and a potential deprecation policy. Do you have a link to that? Whatever we decide with this change we'll want to roll it out gradually with a flag. |
The domain name is used today by at least Stackdriver, though they could set up a mapping to enrich the content: https://cloud.google.com/monitoring/api/metrics_knative While Prometheus tends to prefer short, non-namespaced metric names, some other products like Stackdriver and Wavefront tend to prefer somewhat more nested names (deeply for stackdriver, medium for Wavefront). Based on the principle that it's easier to remove data than to add it, I incorporated the domain and component labels in OpenCensus, though I'd be happy with an alternate mechanism that didn't discard these labels. Note that there are some metrics-exporting components from both Serving and Eventing that run in a user's namespace, so having some mechanism (metric name or labels) to distinguish metrics between the two would be useful. At the same time, common metrics like go GC information should have the same metric name for both. Maybe a few examples from our existing documentation:
|
Yes, Stackdriver is using the domain, and the domain is different based on the component. However, the metric domains are pretty static, so it would be manageable keep a map in an otel collector config and prepend the domain to the metric name based on the sender. With that said, I think it would be much nicer to pass the domain as a label rather than simply removing the domain from the metric. This would make it easy to rewrite the name from the domain label in an otel collector config. |
Summary of discussion from 6 July:
|
Direct link to the meeting notes (2021/07/06) |
Probably would be part of #855 |
/assign @dprotaso |
This issue is stale because it has been open for 90 days with no |
/remove-lifecycle stale |
This issue is stale because it has been open for 90 days with no |
/reopen |
/area monitoring
/kind cleanup
We currently prepend a 'domain' and the 'component' name to the metrics. This done for our OpenCensus exporter which might have been cargo cult'd from our stack driver exporter implementation. The prometheus exporter only prefixes the 'component' name to the metric.
pkg/metrics/opencensus_exporter.go
Line 39 in cf1994e
We should determine whether these should be consistent, if there should be a prefix and it's format
cc @upodroid @skonto @evankanderson @MontyCarter @pianohacker
The text was updated successfully, but these errors were encountered: