Skip to content

Commit 4bacb39

Browse files
committed
Fix spanprobe ratelimit and add more logs
1 parent 66f24e5 commit 4bacb39

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

tracer/src/Datadog.Trace/Debugger/Expressions/ProbeExpressionsProcessor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using Datadog.Trace.Debugger.Snapshots;
1111
using Datadog.Trace.Logging;
1212
using Datadog.Trace.Vendors.Newtonsoft.Json;
13+
using Datadog.Trace.Vendors.Serilog.Events;
1314

1415
namespace Datadog.Trace.Debugger.Expressions
1516
{
@@ -54,6 +55,11 @@ internal void AddProbeProcessor(ProbeDefinition probe)
5455
catch (Exception e)
5556
{
5657
Log.Error(e, "Failed to create probe processor for probe: {Id}", probe.Id);
58+
}
59+
60+
if (Log.IsEnabled(LogEventLevel.Debug))
61+
{
62+
Log.Debug("Successfully created probe processor for probe: {Id}", probe.Id);
5763
Log.Debug("Probe definition is {Probe}", JsonConvert.SerializeObject(probe));
5864
}
5965
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ internal void UpdateAddedProbeInstrumentations(IReadOnlyList<ProbeDefinition> ad
239239
fetchProbeStatus.Add(new FetchProbeStatus(probe.Id, probe.Version ?? 0, new ProbeStatus(probe.Id, Sink.Models.Status.RECEIVED, errorMessage: null)));
240240
break;
241241
case LiveProbeResolveStatus.Error:
242+
Log.Warning("ProbeID {ProbeID} error resolving live. Error: {Error}", probe.Id, message);
242243
fetchProbeStatus.Add(new FetchProbeStatus(probe.Id, probe.Version ?? 0, new ProbeStatus(probe.Id, Sink.Models.Status.ERROR, errorMessage: message)));
243244
break;
244245
}
@@ -295,7 +296,7 @@ private static void SetRateLimit(ProbeDefinition probe)
295296
case LogProbe logProbe:
296297
ProbeRateLimiter.Instance.SetRate(probe.Id, logProbe.CaptureSnapshot ? 1 : 5000);
297298
break;
298-
case SpanDecorationProbe or MetricProbe:
299+
case SpanDecorationProbe or MetricProbe or SpanProbe:
299300
ProbeRateLimiter.Instance.TryAddSampler(probe.Id, NopAdaptiveSampler.Instance);
300301
break;
301302
}

0 commit comments

Comments
 (0)