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

Warn instead of failing when renaming metrics using metric_relabel_configs #25888

Merged
merged 4 commits into from
Oct 20, 2023

Conversation

dashpole
Copy link
Contributor

Description:

Fixes #5001

When that issue was filed, we dropped unknown-typed metrics. Now that we convert them to gauges, users may want to use metric_relabel_configs to rename metrics, even if they lose metadata. In the future, we have other enhancements planned to better-support unknown-typed metrics.

Change the error to a warning. It is still likely not a best practice to use relabel configs for this purpose, but for users copy-pasting prometheus configs, it is best not to fail if we can help it.

@github-actions github-actions bot added the receiver/prometheus Prometheus receiver label Aug 18, 2023
@github-actions github-actions bot requested a review from Aneurysm9 August 18, 2023 13:35
@dashpole dashpole marked this pull request as ready for review August 18, 2023 17:06
@dashpole dashpole requested review from a team August 18, 2023 17:06
receiver/prometheusreceiver/config_test.go Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2023

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 7, 2023
@crobert-1 crobert-1 removed the Stale label Oct 9, 2023
@decimalst
Copy link

Hey folks, any traction on this? I was hoping to use this in the context of a prometheus receiver not exporting to prometheus

@crobert-1
Copy link
Member

Pinging @open-telemetry/collector-contrib-approvers for review

Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mx-psi mx-psi merged commit 3a40682 into open-telemetry:main Oct 20, 2023
@github-actions github-actions bot added this to the next release milestone Oct 20, 2023
sigilioso pushed a commit to carlossscastro/opentelemetry-collector-contrib that referenced this pull request Oct 27, 2023
…nfigs (open-telemetry#25888)

**Description:**

Fixes
open-telemetry#5001

When that issue was filed, we dropped unknown-typed metrics. Now that we
convert them to gauges, users may want to use metric_relabel_configs to
rename metrics, even if they lose metadata. In the future, we have other
enhancements planned to better-support unknown-typed metrics.

Change the error to a warning. It is still likely not a best practice to
use relabel configs for this purpose, but for users copy-pasting
prometheus configs, it is best not to fail if we can help it.
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this pull request Nov 12, 2023
…nfigs (open-telemetry#25888)

**Description:**

Fixes
open-telemetry#5001

When that issue was filed, we dropped unknown-typed metrics. Now that we
convert them to gauges, users may want to use metric_relabel_configs to
rename metrics, even if they lose metadata. In the future, we have other
enhancements planned to better-support unknown-typed metrics.

Change the error to a warning. It is still likely not a best practice to
use relabel configs for this purpose, but for users copy-pasting
prometheus configs, it is best not to fail if we can help it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
receiver/prometheus Prometheus receiver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renaming metrics with prometheus receiver produces unknown-type metrics
6 participants