Skip to content

[receiver/prometheusreceiver] fix prom receiver config reload #40780

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

Merged
merged 12 commits into from
Jul 1, 2025

Conversation

erikburt
Copy link
Contributor

@erikburt erikburt commented Jun 17, 2025

Description

Fixing a bug where reloading the Prometheus config, caused config entries of type Secret to be replaced with the literal value of <secret>.

  • Switches to new yaml library which allows for custom marshaling (shoutout to @ridwanmsharif)
  • Adds unit test to ensure reloading promreceiver config doesn't mask secrets

Link to tracking issue

Fixes #40520, #40916

Testing

Documentation

N/A

@erikburt erikburt requested review from dashpole, ArthurSens and a team as code owners June 17, 2025 18:14
Copy link

linux-foundation-easycla bot commented Jun 17, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the receiver/prometheus Prometheus receiver label Jun 17, 2025
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

LGTM, just some very small comments to make tests smaller. They are non-blocking of course!

I'd like to see another review from David or Krajo about the strategy as well, maybe they see something that I couldn't

@erikburt erikburt requested a review from ArthurSens June 30, 2025 18:12
Copy link
Member

@krajorama krajorama left a comment

Choose a reason for hiding this comment

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

LGTM, I'm kicking myself for not finding this solution even though I thought of it and did some search on the current lib :( Nice job!

I've tested this locally with a simple target that uses basic auth.

@dashpole dashpole added the ready to merge Code review completed; ready to merge by maintainers label Jul 1, 2025
@songy23 songy23 merged commit 3d86a5c into open-telemetry:main Jul 1, 2025
187 checks passed
@github-actions github-actions bot added this to the next release milestone Jul 1, 2025
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.

[receiver/prometheusreceiver] basic authentication for urls stopped working
7 participants