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

Fix for - syncTargetAllocator in prometheus metrics receiver doesnt detect regex changes in metrics relabel config #30258

Conversation

rashmichandrashekar
Copy link
Contributor

@rashmichandrashekar rashmichandrashekar commented Jan 2, 2024

Description:
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 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.

@rashmichandrashekar rashmichandrashekar requested a review from a team January 2, 2024 19:36
@github-actions github-actions bot added the receiver/prometheus Prometheus receiver label Jan 2, 2024
@rashmichandrashekar rashmichandrashekar marked this pull request as draft January 2, 2024 19:39
@rashmichandrashekar rashmichandrashekar marked this pull request as ready for review January 6, 2024 20:28
Copy link
Contributor

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 Feb 23, 2024
Copy link
Contributor

github-actions bot commented Mar 8, 2024

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Mar 8, 2024
jpkrohling pushed a commit that referenced this pull request Jul 11, 2024
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants