Skip to content

Commit

Permalink
Add span links to the extracted context in AspNetCore
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharycmontoya committed Jan 9, 2025
1 parent 71321a5 commit 5d3f014
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ public Scope StartAspNetCorePipelineScope(Tracer tracer, Security security, Http
scope.Span.DecorateWebServerSpan(resourceName, httpMethod, host, url, userAgent, tags);
AddHeaderTagsToSpan(scope.Span, request, tracer);

foreach (var link in extractedContext.Links)
{
// TODO: We should probably just add this as another argument in StartActiveInternal
scope.Span.AddLink(link);
}

var originalPath = request.PathBase.HasValue ? request.PathBase.Add(request.Path) : request.Path;
httpContext.Features.Set(new RequestTrackingFeature(originalPath, scope));

Expand Down

0 comments on commit 5d3f014

Please sign in to comment.