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 @@ -707,12 +707,13 @@ private CoreTracer(
707707 : HealthMetrics .NO_OP ;
708708 healthMetrics .start ();
709709
710+ // Start RUM injector health metrics
710711 rumInjectorHealthMetrics =
711712 config .isHealthMetricsEnabled () && config .isRumEnabled ()
712713 ? new DefaultRumInjectorHealthMetrics (this .statsDClient )
713714 : RumInjectorHealthMetrics .NO_OP ;
714715 rumInjectorHealthMetrics .start ();
715- // Register health metrics telemetry collector with RumInjector
716+ // Register rumInjectorHealthMetrics as the RumInjector's telemetry collector
716717 RumInjector .setTelemetryCollector ((DefaultRumInjectorHealthMetrics ) rumInjectorHealthMetrics );
717718
718719 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 @@ -124,21 +124,25 @@ public byte[] getMarkerBytes(String encoding) {
124124 return this .markerCache .computeIfAbsent (encoding , MARKER_BYTES );
125125 }
126126
127+ // set the telemetry collector for the RumInjector
127128 public static void setTelemetryCollector (RumTelemetryCollector collector ) {
128129 telemetryCollector = collector != null ? collector : RumTelemetryCollector .NO_OP ;
129130 }
130131
131- // report that the RUM injector succeeded in injecting the SDK in an HTTP response
132+ // report to the telemetry collector that the RUM injector succeeded in injecting the SDK in an
133+ // HTTP response
132134 public static void reportInjectionSucceed () {
133135 telemetryCollector .onInjectionSucceed ();
134136 }
135137
136- // report that the RUM injector failed to inject the SDK in an HTTP response
138+ // report to the telemetry collector that the RUM injector failed to inject the SDK in an HTTP
139+ // response
137140 public static void reportInjectionFailed () {
138141 telemetryCollector .onInjectionFailed ();
139142 }
140143
141- // report that the RUM injector skipped injecting the SDK in an HTTP response
144+ // report to the telemetry collector that the RUM injector skipped injecting the SDK in an HTTP
145+ // response
142146 public static void reportInjectionSkipped () {
143147 telemetryCollector .onInjectionSkipped ();
144148 }
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