Skip to content

Commit 6dfff5b

Browse files
committed
Add process tags to runtime metrics & dynamic instrumentation metrics probes
1 parent b6e31df commit 6dfff5b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tracer/src/Datadog.Trace/Debugger/DebuggerFactory.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ private static IDogStatsd GetDogStatsd(TracerSettings tracerSettings, string ser
6767
}
6868
else
6969
{
70-
statsd = TracerManagerFactory.CreateDogStatsdClient(tracerSettings, serviceName, constantTags: null, prefix: DebuggerSettings.DebuggerMetricPrefix, telemtryFlushInterval: null);
70+
var processTags = tracerSettings.PropagateProcessTags ? ProcessTags.TagsList : null;
71+
statsd = TracerManagerFactory.CreateDogStatsdClient(tracerSettings, serviceName, processTags, DebuggerSettings.DebuggerMetricPrefix, telemtryFlushInterval: null);
7172
}
7273

7374
return statsd;

tracer/src/Datadog.Trace/TracerManagerFactory.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,9 @@ internal virtual IDiscoveryService GetDiscoveryService(TracerSettings settings)
513513

514514
private static IDogStatsd CreateDogStatsdClient(TracerSettings settings, string serviceName)
515515
{
516+
var processTags = settings.PropagateProcessTags ? ProcessTags.TagsList : [];
516517
var customTagCount = settings.GlobalTags.Count;
517-
var constantTags = new List<string>(5 + customTagCount)
518+
var constantTags = new List<string>(5 + customTagCount + processTags.Count)
518519
{
519520
"lang:.NET",
520521
$"lang_interpreter:{FrameworkDescription.Instance.Name}",
@@ -523,6 +524,8 @@ private static IDogStatsd CreateDogStatsdClient(TracerSettings settings, string
523524
$"{Tags.RuntimeId}:{Tracer.RuntimeId}"
524525
};
525526

527+
constantTags.AddRange(processTags);
528+
526529
if (customTagCount > 0)
527530
{
528531
var tagProcessor = new TruncatorTagsProcessor();

0 commit comments

Comments
 (0)