Class MetricsSegmentListener

java.lang.Object
com.amazonaws.xray.metrics.MetricsSegmentListener
All Implemented Interfaces:
SegmentListener

public class MetricsSegmentListener
extends java.lang.Object
implements SegmentListener
Listener that extracts metrics from Segments and emits them to CloudWatch using a structured log mechanism. Structured logs are sent via UDP to the CloudWatch agent. Configuration of UDP metric emissions is described in MetricsDaemonConfiguration. For a list of supported metrics see EMFMetricFormatter.
  • Constructor Details

  • Method Details

    • afterEndSegment

      public void afterEndSegment​(Segment segment)
      Description copied from interface: SegmentListener
      afterEndSegment is invoked after a segment is ended by the recorder and emitted to the daemon. The segment must not be modified since it has already been sent to X-Ray's backend. Attempts to do so will raise an AlreadyEmittedException.
      Specified by:
      afterEndSegment in interface SegmentListener
      Parameters:
      segment - The segment that has just ended