-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[receiver/prometheus] Add fallback_scrape_protocol during config validation #38018
[receiver/prometheus] Add fallback_scrape_protocol during config validation #38018
Conversation
// to avoid introducing a breaking change. | ||
for _, sc := range scrapeConfigs { | ||
if sc.ScrapeFallbackProtocol == "" { | ||
sc.ScrapeFallbackProtocol = promconfig.PrometheusText0_0_4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also noticed that my choice of default scrape protocol was wrong 🤦 The previous default is Prometheus 0.0.4
nice. we can also revert your change to prometheus/common after this, right? |
yes! |
Given that this bug has made into a release (not a binary release though), I think this deserves its own changelog entry. |
Please make sure we follow https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/release.md#bugfix-release-procedure if we are doing a bugfix release for this! |
Signed-off-by: Arthur Silva Sens <[email protected]> (cherry picked from commit 8cac6a9)
Signed-off-by: Arthur Silva Sens <[email protected]> (cherry picked from commit c404a88)
Signed-off-by: Arthur Silva Sens <[email protected]> (cherry picked from commit 6f00b38)
6f00b38
to
a199703
Compare
Thanks for pointing that out. Base branch changed and commits rebased |
|
From the documented process, I understood that we create a PR to the release branch as the first step. Third step is to merge the release branch back to main 🤔 |
Got it, now I remember - thanks for the pointers |
259c3a2
into
open-telemetry:release/0.120.x
…dation (open-telemetry#38018) During the release process, we noticed a breaking change in the Prometheus receiver caused by open-telemetry#36873. In that PR, I tried adding a fallback scrape protocol by default everytime the PrometheusReceiver was built, but it turned out that config validation happened even before the component was created. And the collector fails startup with invalid configuration This PR moves the addition of scrape protocol to the validation step. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> Fixes open-telemetry#37902 <!--Describe what testing was performed and which tests were added.--> <!--Describe the documentation added.--> <!--Please delete paragraphs that you did not use before submitting.-->
Description
During the release process, we noticed a breaking change in the Prometheus receiver caused by #36873.
In that PR, I tried adding a fallback scrape protocol by default everytime the PrometheusReceiver was built, but it turned out that config validation happened even before the component was created. And the collector fails startup with invalid configuration
This PR moves the addition of scrape protocol to the validation step.
Link to tracking issue
Fixes #37902
Testing
Documentation