Skip to content

Instantiate default metric instances during RegisterKnownFamilies() in PrometheusExporter. - #771

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_970003996
Open

Instantiate default metric instances during RegisterKnownFamilies() in PrometheusExporter.#771
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_970003996

Conversation

@copybara-service

Copy link
Copy Markdown

Instantiate default metric instances during RegisterKnownFamilies() in PrometheusExporter.

In prometheus-cpp, metric families without at least one metric instance are omitted by registry_->Collect(). Initializing default instances upon family registration ensures that Prometheus text snapshots (GetTextSnapshot()) include # HELP and # TYPE metadata blocks immediately after telemetry backend configuration, before any observations occur.

… in `PrometheusExporter`.

In `prometheus-cpp`, metric families without at least one metric instance are omitted by `registry_->Collect()`. Initializing default instances upon family registration ensures that Prometheus text snapshots (`GetTextSnapshot()`) include `# HELP` and `# TYPE` metadata blocks immediately after telemetry backend configuration, before any observations occur.

PiperOrigin-RevId: 970003996
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

Successfully merging this pull request may close these issues.

1 participant