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

Add version package #1422

Merged
merged 1 commit into from Jan 8, 2024
Merged

Add version package #1422

merged 1 commit into from Jan 8, 2024

Conversation

SuperQ
Copy link
Member

@SuperQ SuperQ commented Jan 3, 2024

Migrate the version package from github.com/prometheus/common to github.com/prometheus/client_golang in order to break the circular dependency.

  • Make version a top level package because it uses init() to populate data.

Related to: prometheus/common#58

@SuperQ SuperQ force-pushed the superq/version branch 2 times, most recently from 54d489a to 96aedfd Compare January 3, 2024 15:28
Migrate the `version` package from `github.com/prometheus/common`
to `github.com/prometheus/client_golang` in order to break the circular
dependency.
* Make `version` a top level package because it uses `init()` to
  populate data.

Related to: prometheus/common#58

Signed-off-by: SuperQ <superq@gmail.com>
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, just I would put it prometheus/collectors/version to group collectors in some way.

@SuperQ SuperQ merged commit 185945e into main Jan 8, 2024
9 checks passed
@SuperQ SuperQ deleted the superq/version branch January 8, 2024 13:38
@bwplotka
Copy link
Member

bwplotka commented Jan 8, 2024

In our client_golang sync, with @ArthurSens and @kakkoyun we decided at the end to move it to prometheus/collectors/version package. Hope @SuperQ that's ok, we want to do it before next release of client_golang.

Sorry for confusion. 🤗

@SuperQ
Copy link
Member Author

SuperQ commented Jan 8, 2024

I don't think that's the right place for it. The version package is mostly about having a structured version feature, the metrics collector is secondary.

@bwplotka
Copy link
Member

bwplotka commented Jan 8, 2024

Yes, I understand, but from the client_golang point of view it's generally metric collector. To use it you have provide that structure, which you might reuse in other places, but for this repo, this is the best place. One could provide this structure on their own and somewhere else, but it's too simple to split version structure AND collector separately, thus collectors directory might be a fair trade-off (:

I feel it's prometheus/collectors/version is still better than exporter_toolkit semantically. 🤔 But up to you! I think we decided to move it to prometheus/collectors/version for now, it's too confusing and disorganized to keep it in the root @ArthurSens will do the PR later on.

Sorry I indicated "fair" on Slack on your point around long URL, it's some argument but indeed pretty weak (was late for me) 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants