Skip to content

Commit

Permalink
Set type to queue message (#36397)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishweshbankwar authored May 26, 2023
1 parent f4184e4 commit 8a0a766
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ public RemoteDependencyData(int version, Activity activity, ref ActivityTagsProc
{
Type = $"InProc | {activityTagsProcessor.MappedTags.GetAzNameSpace()}";
}
else if (activity.Kind == ActivityKind.Producer)
{
Type = $"Queue Message | {activityTagsProcessor.MappedTags.GetAzNameSpace()}";
}
else
{
// The Azure SDK sets az.namespace with its resource provider information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,18 @@ public void RemoteDependencyTypeReflectsAzureNamespace(ActivityKind activityKind
var remoteDependencyData = new RemoteDependencyData(2, activity, ref activityTagsProcessor);

Assert.True(activityTagsProcessor.HasAzureNamespace);
Assert.Equal(activity.Kind == ActivityKind.Internal ? "InProc | DemoAzureResource" : "DemoAzureResource", remoteDependencyData.Type);
if (activity.Kind == ActivityKind.Internal)
{
Assert.Equal("InProc | DemoAzureResource", remoteDependencyData.Type);
}
else if (activity.Kind == ActivityKind.Producer)
{
Assert.Equal("Queue Message | DemoAzureResource", remoteDependencyData.Type);
}
else
{
Assert.Equal("DemoAzureResource", remoteDependencyData.Type);
}
}

[Fact]
Expand Down

0 comments on commit 8a0a766

Please sign in to comment.