-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
syncTargetAllocator in prometheus metrics receiver doesnt detect regex changes in metrics relabel config #29313
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Can you reproduce this with the collector configuration? It is hard to tell if this is an issue with the collector or operator |
Thanks @dashpole. This is only related to operator since the method syncTargetAllocator is only relevant to the operator's TargetAllocator component. |
@dashpole the problem here is that we calculate the hash for scrape configs from the target allocator (which we use to check if we need to reload the scrape manager) using We fixed a similar issue in the larget allocator by simply hashing the serialized scrape configs instead. |
got it. Thanks @swiatekm-sumo for the clarification. Can you link to the similar issue? |
Operator issue: open-telemetry/opentelemetry-operator#1926 |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
/label receiver/prometheus help wanted |
Pinging code owners for receiver/prometheus: @Aneurysm9 @dashpole. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
…n relabel config (#32127) **Description:** <Describe what has changed.> Fixing a bug - With the Targetallocator component in prometheus receiver, when prometheus scrape config is updated for metric relabel config with just regex change, the prometheus metrics receiver doesn't update the hash and hence doesn't pick up the metrics relabel config with the new regex. This is because the **regex** struct has unexported fields. This fix similar to the fix made in [opentelemetry-operator](open-telemetry/opentelemetry-operator#2171) fixes this issue by taking into account the unexported fields as well. **Link to tracking Issue:** - #29313 **Testing:** Tested to make sure that just the regex changes in metric relabeling gets picked up with TargetAllocator enabled. Reopening this PR since the old one(#30258) got closed due to inactivity. --------- Co-authored-by: David Ashpole <[email protected]>
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Component(s)
receiver/prometheus
What happened?
Description
When prometheus scrape config is updated for metric relabel config with just regex change, the prometheus metrics receiver doesn't update the hash and hence doesnt pick up the metrics relabel config with the new regex.
Steps to Reproduce
With oteloperator's targetallcoator component enabled, update just the regex field in the scrape job to a different value. The prometheus receiver doesnt get the updated regex in the metric relabel config.
Expected Result
New config should have updated regex for metric relabeling.
Actual Result
The new regex is not picked up by the prometheus metrics receiver.
Collector version
v0.85.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration - Configuration applied to the otel collector's operator config
No response
Log output
No response
Additional context
This is related to this issue. The same fix needs to be made here
The text was updated successfully, but these errors were encountered: