Skip to content

Conversation

@cratelyn
Copy link
Contributor

@cratelyn cratelyn commented Sep 2, 2025

for background, see discussion in #242:

Would you be amenable to feature-gating these public helpers behind
a test-util feature? This is a pretty common approach we've seen
in other crates.

That sounds reasonable to me. Contribution welcome. Thanks. Please
point out very prominently that we might break any of those APIs in
a patch release.

- #242 (comment)

this commit introduces a test-util feature flag.

this feature flag will function as a gate for additional interfaces, such as accessors to read the value of a histogram, that facilitate integration tests inspecting metrics.

comments note that any forthcoming interfaces included by this feature are not subject to stability guarantees.

for background, see discussion in prometheus#242:

> > Would you be amenable to feature-gating these public helpers behind
> > a `test-util` feature? This is a pretty common approach we've seen
> > in other crates.
>
> That sounds reasonable to me. Contribution welcome. Thanks. Please
> point out very prominently that we might break any of those APIs in
> a patch release.

\- <prometheus#242 (comment)>

this commit introduces a `test-util` feature flag.

this feature flag will function as a gate for additional interfaces,
such as accessors to read the value of a histogram, that facilitate
integration tests inspecting metrics.

comments note that any forthcoming interfaces included by this feature
are not subject to stability guarantees.

Signed-off-by: katelyn martin <[email protected]>
@cratelyn
Copy link
Contributor Author

👋 hello, is this still a welcome change?

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

This looks good to me. Mind including a minimal example, e.g. for Histogram in this pull request already?

I want each pull request to leave main in a releasable state. An empty test-util feature isn't quite that.

@cratelyn
Copy link
Contributor Author

This looks good to me. Mind including a minimal example, e.g. for Histogram in this pull request already?

I want each pull request to leave main in a releasable state. An empty test-util feature isn't quite that.

ok. because we squash merge in this repository, some people might prefer these as separate commits.

i've addressed review comments above, and pulled these changed in #242. i am going to close this now.

@cratelyn cratelyn closed this Oct 13, 2025
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.

2 participants