8000 Target parameter labels should not be overridden by config params by roidelapluie · Pull Request #11029 · prometheus/prometheus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Target parameter labels should not be overridden by config params #11029

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 1 commit into from
Sep 6, 2024

Conversation

roidelapluie
Copy link
Member

The following configuration snippet calls
http://127.0.0.1:8000/?foo=value1 instead of
http://127.0.0.1:8000/?foo=value2.
This is incorrect, the labels of the target should be prefered.

- job_name: local
  params:
    foo: [value1]
  static_configs:
    - targets: ['127.0.0.1:8000']
      labels:
        __param_foo: value2

Signed-off-by: Julien Pivotto roidelapluie@o11y.eu

@roidelapluie roidelapluie requested a review from Nexucis July 15, 2022 13:28
@juliusv
Copy link
Member
juliusv commented Aug 10, 2022

This is incorrect, the labels of the target should be prefered.

I think we don't document this precedence anywhere explicitly, but SD labels can override other static settings from the scrape config so you're right that this is inconsistent. Strictly speaking it would be a breaking change now, although I hope nobody would rely on that.

@roidelapluie roidelapluie added this to the Prometheus 3.0 milestone Jul 18, 2023
@bwplotka
Copy link
Member
bwplotka commented Jan 9, 2024

(During Prometheus bug scrub meeting)

Sounds like @roidelapluie added this to Prometheus 3.0 release, we can do it then (should we add some release-3.0 branch or sth?) cc @roidelapluie

@jan--f jan--f removed this from the Prometheus 3.0 milestone Jun 27, 2024
@roidelapluie roidelapluie changed the base branch from main to release-3.0 September 5, 2024 09:20
The following configuration snippet calls
http://127.0.0.1:8000/?foo=value1 instead of
http://127.0.0.1:8000/?foo=value2.
This is incorrect, the labels of the target should be prefered.

```yaml
- job_name: local
  params:
    foo: [value1]
  static_configs:
    - targets: ['127.0.0.1:8000']
      labels:
        __param_foo: value2
```

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Julien <roidelapluie@o11y.eu>
@roidelapluie
Copy link
Member Author

@bwplotka @machine424 @LeviHarrison @aknuds1

Ready for review and for Prom 3.0

Copy link
Member
@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM, from my perspective!

@roidelapluie roidelapluie merged commit b23c32b into prometheus:release-3.0 Sep 6, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
5109
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants
0