Skip to content

Commit

Permalink
Updated change description
Browse files Browse the repository at this point in the history
  • Loading branch information
aavasthy committed Oct 5, 2023
1 parent 5a3ba23 commit 6672ca7
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static OpenTelemetryCoreRecorder CreateRecorder(string operationName,
kind: clientContext.ClientOptions.ConnectionMode == ConnectionMode.Gateway ? DiagnosticScope.ActivityKind.Internal : DiagnosticScope.ActivityKind.Client);

// The scope here checks for listeners at Operation Level.
// If there are listeners at operation level then scope is enabled and activity is created.
// If there are listeners at operation level then scope is enabled and it tries to create activity.
if (scope.IsEnabled)
{
scope.SetDisplayName($"{operationName} {containerName}");
Expand All @@ -65,16 +65,16 @@ public static OpenTelemetryCoreRecorder CreateRecorder(string operationName,
}
#if !INTERNAL
// The scope here checks for listeners at Network Level.
// If there are listeners at network level and no parent activity created at operation level
// then create a network scope that creates a parent activity.
// If there are listeners at network level then scope is enabled and it tries to create activity.
// Need a parent activity at root level so as to group all network activities under it.
else
{
DiagnosticScope requestScope = LazyNetworkScopeFactory.Value.CreateScope(name: operationName);
openTelemetryRecorder = requestScope.IsEnabled ? OpenTelemetryCoreRecorder.CreateNetworkLevelParentActivity(networkScope: requestScope) : openTelemetryRecorder;
}

// If there are no listeners at operation level and network level and no parent activity
// then create a dummy parent activity.
// If there are no listeners at operation level and network level and no parent activity created.
// Then create a dummy activity as there should be a parent level activity always when Distributed tracing is on.
if (Activity.Current is null)
{
openTelemetryRecorder = OpenTelemetryCoreRecorder.CreateParentActivity(operationName);
Expand Down

0 comments on commit 6672ca7

Please sign in to comment.