Skip to content

Change default prometheus host from 0.0.0.0 to localhost #8297

@jack-berg

Description

@jack-berg

Prometheus spec for both the env var and programmatic config says the default host should be localhost:

(This is the result of a change from 2022: ttps://github.com/open-telemetry/opentelemetry-specification/pull/2282)

In java, we default to 0.0.0.0:

We should update to align with spec.

This is breaking change, but is allowed since PrometheusHttpServer is experimental. Unfortunately, I don't think there's a great way to make this change without ripping the bandaid off. Maybe we could detect that the default host was used, and log a warning indicating that the default has changed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions