Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Jul 30, 2024
1 parent 0d61918 commit eff6c7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Shared/Diagnostics/ActivityCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ internal static class ActivityCreator
// Can only happen if there is a race between HasListeners and CreateActivity calls,
// and someone removing the listener.
//
// The only negative of calling the propagator twice is a small performance hit, but
// it's small and unlikely so it's not worth trying to optimize.
// The only negative of calling the propagator twice is a small performance hit.
// It's small and unlikely so it's not worth trying to optimize.
propagator.ExtractTraceIdAndState(
distributedContextCarrier,
propagatorGetter,
Expand Down
4 changes: 2 additions & 2 deletions src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -857,11 +857,11 @@ public override IReadOnlyList<Type> GetParameterTypes(string methodName)
];
IEnumerable<ActivityLink>? links = (linkedActivity is not null) ? [new ActivityLink(linkedActivity.Context)] : null;

var propagator = serviceProvider.GetService<DistributedContextPropagator>() ?? DistributedContextPropagator.Current;

Activity? activity;
if (headers != null)
{
var propagator = serviceProvider.GetService<DistributedContextPropagator>() ?? DistributedContextPropagator.Current;

activity = ActivityCreator.CreateFromRemote(
activitySource,
propagator,
Expand Down

0 comments on commit eff6c7e

Please sign in to comment.