[HttpClient] Add error.type for traces and metrics#5005
Merged
CodeBlanch merged 22 commits intoopen-telemetry:mainfrom Nov 8, 2023
Merged
[HttpClient] Add error.type for traces and metrics#5005CodeBlanch merged 22 commits intoopen-telemetry:mainfrom
error.type for traces and metrics#5005CodeBlanch merged 22 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5005 +/- ##
==========================================
- Coverage 83.69% 83.39% -0.31%
==========================================
Files 296 296
Lines 12403 12452 +49
==========================================
+ Hits 10381 10384 +3
- Misses 2022 2068 +46
Flags with carried forward coverage won't be shown. Click here to find out more.
|
cijothomas
reviewed
Nov 6, 2023
| { | ||
| if (currentStatusCode == ActivityStatusCode.Unset) | ||
| { | ||
| activity.SetStatus(SpanHelper.ResolveSpanStatusForHttpStatusCode(activity.Kind, (int)response.StatusCode)); |
Member
There was a problem hiding this comment.
is this change related to "error.type" ?
Member
Author
There was a problem hiding this comment.
No, this was there already
. I just moved it to the top.
utpilla
reviewed
Nov 6, 2023
src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs
Show resolved
Hide resolved
utpilla
reviewed
Nov 6, 2023
src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs
Outdated
Show resolved
Hide resolved
utpilla
reviewed
Nov 6, 2023
utpilla
reviewed
Nov 6, 2023
utpilla
reviewed
Nov 6, 2023
src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs
Outdated
Show resolved
Hide resolved
…lerDiagnosticListener.cs Co-authored-by: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com>
Co-authored-by: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com>
…lerMetricsDiagnosticListener.cs Co-authored-by: Timothy Mothra <tilee@microsoft.com>
Co-authored-by: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com>
Co-authored-by: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com>
utpilla
reviewed
Nov 7, 2023
src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerMetricsDiagnosticListener.cs
Outdated
Show resolved
Hide resolved
…lerMetricsDiagnosticListener.cs Co-authored-by: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com>
CodeBlanch
reviewed
Nov 7, 2023
src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs
Outdated
Show resolved
Hide resolved
CodeBlanch
reviewed
Nov 8, 2023
src/OpenTelemetry.Instrumentation.Http/Implementation/HttpHandlerDiagnosticListener.cs
Outdated
Show resolved
Hide resolved
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.
Fixes #
Design discussion issue #
Changes
Adds error.type attribute to activity and
http.client.request.durationfor HttpClient fornon-netframeworktargets.error.typeattribute to activity fornetstandard,net6.0,net7.0andnet8.0targets. Fornet8.0target the value will vary due to the addition of HttpRequestError Enum, which allows further drilldown ofHttpRequestException\HttpIOExceptiontype. This is in sync with how the tag is emitted onhttpclient.request.durationmetric on .NET8.0.error.typeattribute tohttp.client.request.durationmetric fornetstandard,net6.0andnet7.0targets. Onnet8.0, metric will be emitted via added meterSystem.Net.Httpwithin instrumentation library.TODO: Cover
HttpWebRequest.Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes