Skip to content

Commit 78f16bc

Browse files
snakorse郭刚平
and
郭刚平
authored
feature: Shorten the operationname of HttpClient ExistSpan (#354)
Co-authored-by: 郭刚平 <gangping.guo@xiaobao100.com>
1 parent 7db11b0 commit 78f16bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SkyApm.Diagnostics.HttpClient/Handlers/DefaultRequestDiagnosticHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*
1717
*/
1818

19+
using System;
1920
using System.Linq;
2021
using System.Net.Http;
2122
using SkyApm.Common;
@@ -43,7 +44,7 @@ public bool OnlyMatch(HttpRequestMessage request)
4344

4445
public void Handle(ITracingContext tracingContext, HttpRequestMessage request)
4546
{
46-
var operationName = request.RequestUri.ToString();
47+
var operationName = request.RequestUri.GetLeftPart(UriPartial.Path);
4748
var shouldStopPropagation = _httpClientDiagnosticConfig.StopHeaderPropagationPaths != null
4849
&& _httpClientDiagnosticConfig.StopHeaderPropagationPaths
4950
.Any(pattern => FastPathMatcher.Match(pattern, operationName));

0 commit comments

Comments
 (0)