-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[release/9.0] Fix duplicate error.type on kestrel.connection.duration #57581
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
Merged
Conversation
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
Approved over email. |
wtgodbe
approved these changes
Sep 3, 2024
This was referenced Jul 22, 2025
Closed
chore: Bump Microsoft.AspNetCore.Components.WebAssembly.DevServer and 6 others
Markinatorina/MSAVA#7
Merged
This was referenced Aug 8, 2025
This was referenced Aug 15, 2025
Open
Open
This was referenced Aug 25, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Servicing-approved
Shiproom has approved the issue
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.
Backport of #57561 to release/9.0
/cc @JamesNK
Fix duplicate error.type on kestrel.connection.duration
kestrel.connection.duration
is a metric introduced in .NET 8. It captures how long a connection lasted along with connection metadata. In .NET 9, the metric now records now more information about connection errors.The issue is the
error.type
tag could be added to the metric twice, which causes some tooling in the OTEL ecosystem to error.The fix is to ensure that only one
error.type
tag is present.Fixes #57558
Customer Impact
Tooling that uses metrics, such as Prometheus, will error if there are duplicate tag. The customer must be forced to disable that metric.
This issue was introduced in the last .NET 9 preview and there is already one customer reporting it.
Regression?
Although the extra detail in
error.type
is new in .NET 9, customers successfully usingkestrel.connection.duration
in .NET 8 will be broken after upgrading to .NET 9.Risk
Product change is to double check if
error.type
is present before adding it.Verification
Manual testing:
Before: (two
error.type
values per line in result)After: (one
error.type
value per line in result)Packaging changes reviewed?
When servicing release/2.1