@Override public void endEvent(MetricType f) { endEvent(f.name()); }
@Override public void startEvent(MetricType f) { startEvent(f.name()); }
@Override public final boolean equals(Object o) { if (!(o instanceof MetricType)) return false; MetricType that = (MetricType)o; return this.name().equals(that.name()); } @Override public final String toString() { return name(); }
@Override public void addProperty(MetricType f, Object value) { addProperty(f.name(), value); }
@Override public void incrementCounter(MetricType f) { incrementCounter(f.name()); }
@Override public void setCounter(MetricType f, long count) { setCounter(f.name(), count); }
@Override public List<Object> getProperty(MetricType f){ return getProperty(f.name()); }
private void collectMetrics0(Request<?> request, Response<?> response) { AWSRequestMetrics arm = request.getAWSRequestMetrics(); if (arm == null || !arm.isEnabled()) { return; } for (MetricType type: AwsSdkMetrics.getPredefinedMetrics()) { if (!(type instanceof RequestMetricType)) continue; PredefinedMetricTransformer transformer = getTransformer(); for (MetricDatum datum : transformer.toMetricData(type, request, response)) { try { if (!addMetricsToQueue(datum)) { if (log.isDebugEnabled()) { log.debug("Failed to add to the metrics queue (due to no space available) for " + type.name() + ":" + request.getServiceName()); } } } catch(RuntimeException ex) { log.warn("Failed to add to the metrics queue for " + type.name() + ":" + request.getServiceName(), ex); } } } }
if (metricType.name().startsWith(aws.name())) { List<MetricDatum> metricData = aws.getRequestMetricTransformer() .toMetricData(metricType, request, response); String reqClassName = origReq == null ? null : origReq.getClass().getName(); log.debug("No request metric transformer can be found for metric type " + metricType.name() + " for " + reqClassName);
dims.add(new Dimension() .withName(Dimensions.MetricType.name()) .withValue(metricType.name()));
AWSRequestMetrics m = req.getAWSRequestMetrics(); TimingInfo ti = m.getTimingInfo(); final String metricName = type.name(); Number counter = ti.getCounter(metricName); if (counter == null) {
AWSRequestMetrics m = req.getAWSRequestMetrics(); TimingInfo root = m.getTimingInfo(); final String metricName = metricType.name(); List<TimingInfo> subMeasures = root.getAllSubMeasurements(metricName);
@Override public void addProperty(MetricType f, Object value) { addProperty(f.name(), value); }
@Override public List<Object> getProperty(MetricType f){ return getProperty(f.name()); }
@Override public void startEvent(MetricType f) { startEvent(f.name()); }
@Override public final boolean equals(Object o) { if (!(o instanceof MetricType)) return false; MetricType that = (MetricType) o; return this.name().equals(that.name()); }
@Override public final boolean equals(Object o) { if (!(o instanceof MetricType)) return false; MetricType that = (MetricType)o; return this.name().equals(that.name()); } @Override public final String toString() { return name(); }
@Override public void incrementCounter(MetricType f) { incrementCounter(f.name()); }
@Override public void setCounter(MetricType f, long count) { setCounter(f.name(), count); }
@Override public void endEvent(MetricType f) { endEvent(f.name()); }