Skip to content

Commit

Permalink
more descriptive function name
Browse files Browse the repository at this point in the history
  • Loading branch information
andracc committed Oct 14, 2024
1 parent ae0ff12 commit 1846a51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Backend/Otel/OtelKernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ internal static void TrackSession(Activity activity, HttpRequest request)
}
}

internal static void GetContentLength(Activity activity, IHeaderDictionary headers, string label)
internal static void GetContentLengthAspNet(Activity activity, IHeaderDictionary headers, string label)
{
var contentLength = headers.ContentLength;
if (contentLength.HasValue)
Expand All @@ -67,12 +67,12 @@ private static void AspNetCoreBuilder(AspNetCoreTraceInstrumentationOptions opti
options.RecordException = true;
options.EnrichWithHttpRequest = (activity, request) =>
{
GetContentLength(activity, request.Headers, "inbound.http.request.body.size");
GetContentLengthAspNet(activity, request.Headers, "inbound.http.request.body.size");
TrackSession(activity, request);
};
options.EnrichWithHttpResponse = (activity, response) =>
{
GetContentLength(activity, response.Headers, "inbound.http.response.body.size");
GetContentLengthAspNet(activity, response.Headers, "inbound.http.response.body.size");
};
}
[ExcludeFromCodeCoverage]
Expand Down

0 comments on commit 1846a51

Please sign in to comment.