public class MetricsHttpSink
extends java.lang.Object
implements org.apache.beam.sdk.metrics.MetricsSink
| Modifier and Type | Class and Description |
|---|---|
static class |
MetricsHttpSink.MetricKeySerializer
JSON serializer for
MetricKey; output a "name" object and a "step"
or "pcollection" field with the corresponding label. |
static class |
MetricsHttpSink.MetricNameSerializer
JSON serializer for
MetricName; simple {namespace,name} for user-metrics, full URN for
system metrics. |
static class |
MetricsHttpSink.MetricResultSerializer
JSON serializer for
MetricResult; conform to an older format where the key's name and "step" (ptransform) are inlined. |
| Constructor and Description |
|---|
MetricsHttpSink(org.apache.beam.sdk.metrics.MetricsOptions pipelineOptions) |
| Modifier and Type | Method and Description |
|---|---|
void |
writeMetrics(org.apache.beam.sdk.metrics.MetricQueryResults metricQueryResults)
Writes the metricQueryResults via HTTP POST to metrics sink endpoint.
|
public MetricsHttpSink(org.apache.beam.sdk.metrics.MetricsOptions pipelineOptions)
public void writeMetrics(org.apache.beam.sdk.metrics.MetricQueryResults metricQueryResults)
throws java.lang.Exception
writeMetrics in interface org.apache.beam.sdk.metrics.MetricsSinkmetricQueryResults - query results to write.java.lang.Exception - throws IOException for non-200 response from endpoint.