Skip to content

Conversation

incertum
Copy link
Contributor

Deprecates all metric creation methods that accept loose string parameters for name and help text.

This standardizes metric creation on the MetricNameDescriptor type, which requires a metricName, unitName and helpText for all metrics. This improves compliance with official Prometheus client library guidelines ("A MetricFamily MUST have a name, HELP, TYPE, and UNIT metadata.").

The deprecated methods will be removed in a future major version (see #145).

CC @ktoso, thank you!

@incertum incertum added the 🆕 semver/minor Adds new public API. label Oct 14, 2025
Deprecates all metric creation methods that accept loose string parameters for name and help text.

This standardizes metric creation on the MetricNameDescriptor type, which requires a metricName, unitName and helpText for all metrics. This improves compliance with official Prometheus client library guidelines ("A MetricFamily MUST have a name, HELP, TYPE, and UNIT metadata.").

The deprecated methods will be removed in a future major version (see swift-server#145).

Signed-off-by: Melissa Kilby <[email protected]>
@incertum incertum force-pushed the deprecation/help-unit-required-future branch from ac36981 to 0babf92 Compare October 14, 2025 19:42
@incertum
Copy link
Contributor Author

Additional note: We should avoid redirecting to the public APIs that have now been marked as deprecated. I wanted to first ask for your opinion on this @ktoso . Happy to make these additional changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant