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

Use namespace prefix on Prometheus registry #4025

Open
thorfour opened this issue Apr 6, 2021 · 10 comments
Open

Use namespace prefix on Prometheus registry #4025

thorfour opened this issue Apr 6, 2021 · 10 comments

Comments

@thorfour
Copy link
Contributor

thorfour commented Apr 6, 2021

Is your proposal related to a problem?

There is a current pattern to prefix all metrics with the thanos_ prefix. This is what the namespace feature of the Prometheus registry is intended for.

Describe the solution you'd like

Remove thanos_ prefixes from metrics, and add it to the registry as a namespace.

Describe alternatives you've considered

Do nothing, and continue to enforce the prefix on pull request reviews.

Additional context

I added a histogram expecting the namespace to be provided by the registry, instead it was unexpected toil during review.

@wiardvanrij
Copy link
Member

This would be an improvement IMO. I also don't see any downsides of doing this.

@stale
Copy link

stale bot commented Jun 26, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@onprem
Copy link
Member

onprem commented Jun 27, 2021

Still valid and help wanted :)

@vanugrah
Copy link
Contributor

While we're at it I think we should leverage different subsystems as opposed to prefixing metrics with query/rule/store/compact etc.

@stale
Copy link

stale bot commented Oct 11, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Oct 11, 2021
@stale
Copy link

stale bot commented Oct 30, 2021

Closing for now as promised, let us know if you need this to be reopened! 🤗

@onprem onprem removed the stale label Nov 2, 2021
@stale
Copy link

stale bot commented Jan 9, 2022

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jan 9, 2022
@stale
Copy link

stale bot commented Mar 2, 2022

Closing for now as promised, let us know if you need this to be reopened! 🤗

@stale stale bot closed this as completed Mar 2, 2022
@matej-g matej-g reopened this Mar 3, 2022
@stale stale bot removed the stale label Mar 3, 2022
@bisakhmondal
Copy link
Contributor

Remove thanos_ prefixes from metrics

It's a good idea.

and add it to the registry as a namespace.

Just wondering, would having a namespace add any help? Users can always define scrape job config with job name thanos. and all the thanos specific metrics can be visualized via something like {job:"thanos"}. The client_golang library is also planning to get rid of this namespacing and subsystems in later versions. prometheus/client_golang#240 (comment)

While we're at it I think we should leverage different subsystems as opposed to prefixing metrics with query/rule/store/compact etc.

We can use this to auto inject the prefix https://pkg.go.dev/github.com/prometheus/client_golang/prometheus#WrapRegistererWithPrefix

Let me know, what do you think. I'd love to work on this issue : )

@stale
Copy link

stale bot commented Jun 12, 2022

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants