opentelemetry-cpp icon indicating copy to clipboard operation
opentelemetry-cpp copied to clipboard

Prometheus Release 9.0 Causes a Port Binding Error When Using the Prometheus Exporter

Open erichsueh3 opened this issue 5 years ago • 5 comments

Is your feature request related to a problem? Yes. Currently, the OpenTelemetry CPP repo uses the latest release, version 9.0, of the CPP Prometheus client. However, using this release will throw an exception when trying to use the Prometheus Exporter. The exception reads libc++abi.dylib: terminating with uncaught exception of type CivetException: null context when constructing CivetServer. Possible problem binding to port.

Describe the solution you'd like Until a new release is established, we instead should use the master branch of the CPP Prometheus client. Though this means we won’t be using a stable version, the Prometheus Exporter would work properly and when a newer version is released, that could be the new version to use.

Describe alternatives you've considered Alternatively, we can keep using version 9.0 and wait for a new version of the Prometheus client to be released. This allows the Prometheus Exporter to be dependent on a stable release; however, the Prometheus Exporter would not work, and a new release may not come soon.

erichsueh3 avatar Sep 04 '20 19:09 erichsueh3

This can be done by removing git checkout v0.9.0 in line 52 of ./ci/do_ci.sh.

erichsueh3 avatar Sep 04 '20 19:09 erichsueh3

This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs.

github-actions[bot] avatar Nov 24 '21 01:11 github-actions[bot]

This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs.

github-actions[bot] avatar Jan 24 '22 01:01 github-actions[bot]

Closed as inactive. Feel free to reopen if this is still an issue.

github-actions[bot] avatar Feb 01 '22 01:02 github-actions[bot]

This issue was marked as stale due to lack of activity. It will be closed in 7 days if no furthur activity occurs.

github-actions[bot] avatar Apr 02 '22 02:04 github-actions[bot]

The port number to use for the prometheus scrape is configurable.

With the following fix:

  • https://github.com/open-telemetry/opentelemetry-cpp/pull/1396

the documentation to use prometheus has been expanded, and provides details.

When an instrumented process exposes a scrape port, 9464 by default, or as set in:

  • environment variable PROMETHEUS_EXPORTER_ENDPOINT
  • PrometheusExporterOptions::url

the port must be available, so the process can bind to it.

Closing this issue, it is now resolved.

marcalff avatar Jun 20 '23 15:06 marcalff