-
Notifications
You must be signed in to change notification settings - Fork 1.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
Allow user to pass in metrics namespace for prometheus exporter #5692
Comments
Hey @splunkericl. I'm curios what is your use case?
What metrics do want to add that end up with The |
Also the issue title mentions prometheus exporter which not part of this repo |
@dmitryax the use case is custom builds or custom distros of the Collector which have a name that is different from "OpenTelemetry Collector". In such cases you may want to change own metric names to avoid using "otelcol" namespace to avoid confusion (in some environments people may have canonical Otel Collector and custom distros co-existing, so differentiating their metrics can be useful). The hard-coded "otelcol" namespace value is currently used as a prefix for all own metrics that the Collector exposes (by default we expose them as Prometheus metrics on http://localhost:8888/metrics). |
It makes sense now. Thanks for clarifying. |
@tigrannajaryan as mentioned in the PR, this is only supported in opencensus, and we try to move away from that. Should we just remove the "otelcol" namespace from metrics for the moment? This will make transition to opentelemetry even harder. |
@bogdandrutu I don't think we can just remove the namespace. The collector's metrics are widely adopted in the current form. It'll be a significant breaking change for collector users that care about collector's observability. Also removing the namespace can introduce conflicts with other systems given that we will get metrics like Can't we align metrics exposed with |
I agree with @dmitryax
When we migrate to If there is a strong desire to get rid of |
I still believe that we should not allow users to change it (not expose this option). We made this decision to have "otelcol" prefix fine, we will not break observability, but we should not allow users to change it and support this "option" |
The problem is that, if we add that capability and otel-go does not support we are stuck on opencensus. Without that, we can just go and change all metrics to have otelcol prefix name (when changing to otel-go) and we are good. |
I agree with you. I recommended @splunkericl couple of approaches that can address the need without introducing any configuration options here. Once applied, I think we can close this issue |
As discussed with @splunkericl, solving #5882 will make this issue not needed anymore |
Closing this issue as #5882 is now resolved |
Is your feature request related to a problem? Please describe.
Currently, all metrics emitted in otel collector have namespace set to
otelcol
. If the otel collector user adds their own metrics they would end up having the same prefix. For our team, we are not interested to have the prefix for our metrics name.From the otel collector user perspective, the metrics namespace should be customizable. If the user decides not to have any namespace to make the metrics more readable, it should be an option.
Describe the solution you'd like
A new field is added in
ServiceTelemetryMetrics
ingo.opentelemetry.io/collector/config/service.go
the namespace is passed in to prometheus exporter namespace
Describe alternatives you've considered
user can remove the name prefix when scraping the metric
Additional context
N/A
The text was updated successfully, but these errors were encountered: