File tree Expand file tree Collapse file tree 5 files changed +15
-8
lines changed
dd-trace-core/src/main/java/datadog/trace/core
internal-api/src/main/java/datadog/trace/api/rum Expand file tree Collapse file tree 5 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -708,12 +708,13 @@ private CoreTracer(
708708 : HealthMetrics .NO_OP ;
709709 healthMetrics .start ();
710710
711+ // Start RUM injector health metrics
711712 rumInjectorHealthMetrics =
712713 config .isHealthMetricsEnabled () && config .isRumEnabled ()
713714 ? new DefaultRumInjectorHealthMetrics (this .statsDClient )
714715 : RumInjectorHealthMetrics .NO_OP ;
715716 rumInjectorHealthMetrics .start ();
716- // Register health metrics telemetry collector with RumInjector
717+ // Register rumInjectorHealthMetrics as the RumInjector's telemetry collector
717718 RumInjector .setTelemetryCollector ((DefaultRumInjectorHealthMetrics ) rumInjectorHealthMetrics );
718719
719720 performanceMonitoring =
Original file line number Diff line number Diff line change 1212import org .slf4j .Logger ;
1313import org .slf4j .LoggerFactory ;
1414
15- // Default implementation of RumInjectorHealthMetrics that reports metrics to StatsDClient
15+ // Default implementation of RumInjectorHealthMetrics that reports metrics via StatsDClient
16+ // This class implements the RumTelemetryCollector interface, which is used to collect telemetry
17+ // from the RumInjector in the internal-api module
1618public class DefaultRumInjectorHealthMetrics extends RumInjectorHealthMetrics
1719 implements RumTelemetryCollector {
1820 private static final Logger log = LoggerFactory .getLogger (DefaultRumInjectorHealthMetrics .class );
Original file line number Diff line number Diff line change 11package datadog .trace .core .monitor ;
22
3- // Abstract health metrics for RUM injector
4- // This class defines the interface for monitoring RUM injection operations
3+ // Abstract health metrics class for RUM injector
54public abstract class RumInjectorHealthMetrics implements AutoCloseable {
65 public static RumInjectorHealthMetrics NO_OP = new RumInjectorHealthMetrics () {};
76
Original file line number Diff line number Diff line change @@ -126,21 +126,25 @@ public byte[] getMarkerBytes(String encoding) {
126126 return this .markerCache .computeIfAbsent (encoding , MARKER_BYTES );
127127 }
128128
129+ // set the telemetry collector for the RumInjector
129130 public static void setTelemetryCollector (RumTelemetryCollector collector ) {
130131 telemetryCollector = collector != null ? collector : RumTelemetryCollector .NO_OP ;
131132 }
132133
133- // report that the RUM injector succeeded in injecting the SDK in an HTTP response
134+ // report to the telemetry collector that the RUM injector succeeded in injecting the SDK in an
135+ // HTTP response
134136 public static void reportInjectionSucceed () {
135137 telemetryCollector .onInjectionSucceed ();
136138 }
137139
138- // report that the RUM injector failed to inject the SDK in an HTTP response
140+ // report to the telemetry collector that the RUM injector failed to inject the SDK in an HTTP
141+ // response
139142 public static void reportInjectionFailed () {
140143 telemetryCollector .onInjectionFailed ();
141144 }
142145
143- // report that the RUM injector skipped injecting the SDK in an HTTP response
146+ // report to the telemetry collector that the RUM injector skipped injecting the SDK in an HTTP
147+ // response
144148 public static void reportInjectionSkipped () {
145149 telemetryCollector .onInjectionSkipped ();
146150 }
Original file line number Diff line number Diff line change 11package datadog .trace .api .rum ;
22
3- // Collect RUM injection telemetry
3+ // Collect RUM injection telemetry from the RumInjector
4+ // This is implemented by the DefaultRumInjectorHealthMetrics class in the dd-trace-core module
45public interface RumTelemetryCollector {
56
67 RumTelemetryCollector NO_OP =
You can’t perform that action at this time.
0 commit comments