Skip to content
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

New internal metric added promhttp_metric_handler_errors_total #12383

Open
dmitryax opened this issue Feb 13, 2025 · 2 comments
Open

New internal metric added promhttp_metric_handler_errors_total #12383

dmitryax opened this issue Feb 13, 2025 · 2 comments

Comments

@dmitryax
Copy link
Member

dmitryax commented Feb 13, 2025

What happened?

promhttp_metric_handler_errors_total metric was added as a result of the migration done #11611.

The metric doesn't seem valuable to be reported for the collector observability. Discussed in https://github.com/open-telemetry/opentelemetry-collector/pull/11611/files#r1953845130. It also doesn't follow the convention we established so far for the internal collector metrics prefixed with otelcol_.

I propose we create a view for dropping it by default.

Collector version

0.119.0

@dmitryax dmitryax added bug Something isn't working and removed bug Something isn't working labels Feb 13, 2025
@dmitryax
Copy link
Member Author

it's added by the prometheus server that is started via the SDK. we might be able to drop it via a view

@codeboten the metric cannot be dropped with the views because it's added by the prometheus exporter. It's enabled by passing the registry with promhttp.HandlerOpts in https://github.com/open-telemetry/opentelemetry-go-contrib/blob/4ddf26b05b2ce16c9d91157ffa7151baca36d781/config/v0.3.0/metric.go#L330. In collector, we used to not pass it

mux.Handle("/metrics", promhttp.HandlerFor(registry, promhttp.HandlerOpts{}))
.

Not sure what can be done to remove it from prometheus exporter. Can this be exposed as a config option of the go SDK?

@codeboten
Copy link
Contributor

codeboten commented Feb 19, 2025

It also doesn't follow the convention we established so far for the internal collector metrics prefixed with otelcol_.

It could be argued that this falls into the category of an instrumentation library metric which doesn't require the prefix (we have the same thing w/ http/grpc instrumentation libraries). I agree that it would be nice to have a way to disable it for end users.

Not sure what can be done to remove it from prometheus exporter. Can this be exposed as a config option of the go SDK?

In the past, options that have been provided via the configuration package have required a spec PR first to ensure the configuration schema doesn't include features that are not spec'd. I could see this falling into the same case as other prometheus exporter options mentioned here: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/prometheus.md#configuration

Do you want to open a PR to the spec to add an option there and we can move forward w/ this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants