You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Log.Debug($"Activity {activity.Id} has no tags. Not adding tags to segment.");
519
+
return;
520
+
}
521
+
522
+
// based on activity kind, create the appropriate segment data
523
+
switch(activityKind)
524
+
{
525
+
caseActivityKind.Client:
526
+
// could be an http call or a database call, so need to look for specific tags to decide
527
+
if(tags.TryGetValue<string,string,object>("http.request.method",outvarmethod)||tags.TryGetValue<string,string,object>("http.method",outmethod))// it's an HTTP call
Log.Debug($"Activity {activity.Id} with Activity.Kind {activityKind} is missing required tags for url and method. Not creating an ExternalSegmentData.");
Log.Debug($"Activity {activity.Id} with Activity.Kind {activityKind} is missing required tags to determine whether it's an HTTP or database activity.");
569
+
}
570
+
break;
571
+
caseActivityKind.Internal:
572
+
caseActivityKind.Server:
573
+
caseActivityKind.Producer:
574
+
caseActivityKind.Consumer:
575
+
default:
576
+
// as a fallback, add all tags to the segment as custom attributes if we did not create a specific segment data type.
577
+
foreach(vartagintags)
578
+
{
579
+
// TODO: We may not want to add all tags to the segment. We may want to filter out some tags, especially
580
+
// the ones that we map to intrinsic or agent attributes.
581
+
segment.AddCustomAttribute(tag.Key,tag.Value);
582
+
}
583
+
break;
517
584
}
518
585
}
519
586
@@ -674,6 +741,8 @@ public RuntimeNewRelicActivity(object activity)
0 commit comments