[Exporter.Prometheus] Separate enums - #7751
Merged
martincostello merged 2 commits intoSep 16, 2026
Merged
Conversation
Separate the enums for the Prometheus translation strategy so the two different exporter packages don't have a public type with the same name.
martincostello
commented
Sep 15, 2026
martincostello
commented
Sep 15, 2026
Add PR number.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Both breaking-change entries need the repository-required colon in their prefixes.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Separates Prometheus translation strategy APIs by exporter to prevent public type-name collisions.
Changes:
- Adds exporter-specific public enums backed by an internal shared enum.
- Updates options, API baselines, and tests.
- Documents the breaking renames.
File summaries
| File | Description |
|---|---|
test/...HttpListener.Tests/PrometheusTranslationStrategyTests.cs |
Updates default enum assertion. |
test/...HttpListener.Tests/PrometheusProtocolTests.cs |
Tests both exporter-specific enums. |
test/...AspNetCore.Tests/PrometheusIntegrationTests.cs |
Uses the ASP.NET Core enum. |
test/...AspNetCore.Tests/PrometheusExporterMiddlewareTests.cs |
Updates strategy scenarios. |
test/...AspNetCore.Tests/PrometheusExporterMeterProviderBuilderExtensionsTests.cs |
Updates option tests. |
src/...HttpListener/PrometheusHttpListenerTranslationStrategy.cs |
Adds the HttpListener enum. |
src/...HttpListener/PrometheusHttpListenerOptions.cs |
Exposes the new enum. |
src/...HttpListener/PrometheusHttpListenerMeterProviderBuilderExtensions.cs |
Converts to the internal enum. |
src/...HttpListener/Internal/Shared/PrometheusTranslationStrategy.cs |
Makes the shared enum internal. |
src/...HttpListener/CHANGELOG.md |
Documents the rename. |
src/...HttpListener/.publicApi/PublicAPI.Unshipped.txt |
Updates the public API baseline. |
src/...AspNetCore/PrometheusAspNetCoreTranslationStrategy.cs |
Adds the ASP.NET Core enum. |
src/...AspNetCore/PrometheusAspNetCoreOptions.cs |
Bridges public and internal enums. |
src/...AspNetCore/CHANGELOG.md |
Documents the rename. |
src/...AspNetCore/.publicApi/PublicAPI.Unshipped.txt |
Updates the public API baseline. |
Review details
- Files reviewed: 15/15 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7751 +/- ##
==========================================
- Coverage 91.87% 91.86% -0.02%
==========================================
Files 337 337
Lines 18380 18380
==========================================
- Hits 16887 16884 -3
- Misses 1493 1496 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Kielek
approved these changes
Sep 15, 2026
martincostello
marked this pull request as ready for review
September 15, 2026 19:13
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 16, 2026
This was referenced Sep 18, 2026
This was referenced Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Separate the enums for the Prometheus translation strategy so the two different exporter packages don't have a public type with the same name.
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes