Skip to content

Commit 1e0d537

Browse files
committed
Clean up
1 parent 67031ad commit 1e0d537

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

src/Hosting/Hosting/src/Internal/HostingApplicationDiagnostics.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ private void RecordRequestStartMetrics(HttpContext httpContext)
390390
hasDiagnosticListener = false;
391391

392392
var headers = httpContext.Request.Headers;
393-
var activity = ActivityCreator.CreateFromRemoteActivity(
393+
var activity = ActivityCreator.CreateFromRemote(
394394
_activitySource,
395395
_propagator,
396396
headers,

src/Shared/Diagnostics/ActivityCreator.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ internal static class ActivityCreator
1010
/// <summary>
1111
/// Create an activity with details received from a remote source.
1212
/// </summary>
13-
public static Activity? CreateFromRemoteActivity(
13+
public static Activity? CreateFromRemote(
1414
ActivitySource activitySource,
1515
DistributedContextPropagator propagator,
1616
object distributedContextCarrier,

src/SignalR/clients/csharp/Client.Core/src/HubConnection.cs

+4
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,10 @@ private async Task InvokeStreamCore(ConnectionState connectionState, string meth
10871087

10881088
private static void InjectHeaders(HubInvocationMessage invocationMessage)
10891089
{
1090+
// TODO:
1091+
// This sends info about the current activity, regardless of the activity source, to the SignalR server.
1092+
// When SignalR client supports client activities this logic should be updated to only send headers
1093+
// if the SignalR client activity is created. The goal is to match the behavior of distributed tracing in HttpClient.
10901094
if (Activity.Current is { } currentActivity)
10911095
{
10921096
DistributedContextPropagator.Current.Inject(currentActivity, invocationMessage, static (carrier, key, value) =>

src/SignalR/common/testassets/Tests.Utils/TestClient.cs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using Microsoft.AspNetCore.Connections.Features;
99
using Microsoft.AspNetCore.Internal;
1010
using Microsoft.AspNetCore.SignalR.Protocol;
11-
using System.Reflection.PortableExecutable;
1211

1312
#if TESTUTILS
1413
using Microsoft.AspNetCore.InternalTesting;

src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ public override IReadOnlyList<Type> GetParameterTypes(string methodName)
861861
Activity? activity;
862862
if (headers != null)
863863
{
864-
activity = ActivityCreator.CreateFromRemoteActivity(
864+
activity = ActivityCreator.CreateFromRemote(
865865
activitySource,
866866
propagator,
867867
headers,

0 commit comments

Comments
 (0)