- All Implemented Interfaces:
public class EMFMetricFormatter extends java.lang.Object implements MetricFormatterCreates metrics based on a Segment.
These metrics are published to CloudWatch via a structured log through CloudWatch Logs. These logs are created in the ServiceMetricsSDK log group.
In addition to the metrics describe below these logs contain properties to enable correlation with Traces.
- Timestamp: The end time of the segment, used for the timestamp of the generated metric.
- TraceId: The Trace ID
Metrics are published to the ServiceMetrics/SDK namespace with dimensions:
- ServiceType: The Segment Origin
- ServiceName: The Segment Name
The following metrics will be reported:
- Latency: The difference between Start and End time in milliseconds
- ErrorRate: 1 if the segment is marked as an error, zero otherwise.
- FaultRate: 1 if the segment is marked as an fault, zero otherwise.
- ThrottleRate: 1 if the segment is marked as throttled, zero otherwise.
- OkRate: 1 if no other statuses are set, zero otherwise.
Rate metrics above may be used with the CloudWatch AVG statistic to get a percentage of requests in a category or may be used as a SUM. COUNT of Latency represents the total count of invocations of this segment.
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
formatSegment(Segment segment)Converts a segment into a metric string.
public java.lang.String formatSegment(Segment segment)Description copied from interface:
MetricFormatterConverts a segment into a metric string.