diff --git a/website/src/_includes/section-menu/documentation.html b/website/src/_includes/section-menu/documentation.html index 015441b24e6..2f8fd80e9cf 100644 --- a/website/src/_includes/section-menu/documentation.html +++ b/website/src/_includes/section-menu/documentation.html @@ -119,6 +119,7 @@
  • Types of metrics
  • Querying metrics
  • Using metrics in pipeline
  • +
  • Export metrics
  • diff --git a/website/src/documentation/programming-guide.md b/website/src/documentation/programming-guide.md index 13f7bc07d11..7db71714fc2 100644 --- a/website/src/documentation/programming-guide.md +++ b/website/src/documentation/programming-guide.md @@ -3121,6 +3121,15 @@ public class MyMetricsDoFn extends DoFn { } } ``` +### 9.5 Export metrics {#export-metrics} +Beam metrics can be exported to external sinks. If a metrics sink is set up in the configuration, the runner will push metrics to it at a default 5s period. +The configuration is held in the [MetricsOptions](https://beam.apache.org/releases/javadoc/2.19.0/org/apache/beam/sdk/metrics/MetricsOptions.html) class. +It contains push period configuration and also sink specific options such as type and URL. As for now only the REST HTTP and the Graphite sinks are supported and only +Flink and Spark runners support metrics export. + +Also Beam metrics are exported to inner Spark and Flink dashboards to be consulted in their respective UI. + + ## 10. State and Timers {#state-and-timers} Beam's windowing and triggering facilities provide a powerful abstraction for grouping and aggregating unbounded input