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

feat!(exporter/blackbox): use required name attr instead label for target block #5945

Merged
merged 7 commits into from
Dec 12, 2023

Conversation

hainenber
Copy link
Contributor

PR Description

Which issue(s) this PR fixes

Fixes #5940

Notes to the Reviewer

Should this be a breaking change? I gave it some thoughts and unless we specify an interface to allow interchangeability (which is awkward, IMO), breaking change it is since label block is mandatory atm.

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@rfratto
Copy link
Member

rfratto commented Dec 9, 2023

I'm on PTO so I shouldn't be on GitHub, but I saw the recommendation for a breaking change in #5940 and wanted to offer an alternative:

Another way of doing this change that wouldn't be a breaking change is to have an optional attribute to override the target name, similar to the job_name attribute in prometheus.scrape:

target "my_target" { // default name: my_target 
  name = "my-target-with-custom-characters" // override default 
  ... 
}

cc @erikbaranowski

@hainenber
Copy link
Contributor Author

Oh that's a good alternative right there. But I couldn't help but wonder if this is some kind of debt that can be cleared before v1.0.0 😄

If Erik's cool with this, I'm cool as well.

Copy link
Contributor

@ptodev ptodev left a comment

Choose a reason for hiding this comment

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

If we go ahead with a breaking change, it will need to be documented in docs/sources/flow/release-notes.md, which corresponds to Release notes for Grafana Agent Flow.

My personal preference would be to just do it as a breaking change, because this seems very minor. However, we should get some team consensus on this before proceeding with a specific approach.

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@erikbaranowski erikbaranowski left a comment

Choose a reason for hiding this comment

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

looks great, thanks for taking care of this!

I'll have a follow up PR likely to address some similar components we have identified.

docs/developer/writing-exporter-flow-components.md Outdated Show resolved Hide resolved
@erikbaranowski
Copy link
Contributor

My preference is to go with the breaking change before 1.0 instead of leaving a potential stumbling block behind. If someone uses a label they may waste time figuring out why job-name is invalid.

@erikbaranowski
Copy link
Contributor

I'm poking at the go test issue to see what is going on

@hainenber
Copy link
Contributor Author

The latest one is A-OK now, the CI complained previously since I added tab instead of spaces :D

@erikbaranowski
Copy link
Contributor

A totally unrelated test had failed in the CI but I can't recreate it locally. I restarted the CI and hopefully it doesn't keep happening.

@erikbaranowski erikbaranowski merged commit 8c0f6de into grafana:main Dec 12, 2023
10 checks passed
@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Dec 12, 2023
@hainenber hainenber deleted the exporter-target-block-name branch January 14, 2024 16:05
BarunKGP pushed a commit to BarunKGP/grafana-agent that referenced this pull request Feb 20, 2024
…rget block (grafana#5945)

* feat!(exporter/blackbox): use required name attr instead label for target block

Signed-off-by: hainenber <[email protected]>

---------

Signed-off-by: hainenber <[email protected]>
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow prometheus.exporter.blackbox to provide target name via a string instead of river identifier
5 participants