Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

with the query parameter get that accepts comma separated metric names, like the other APIs. This path is based on https://github.com/apache/flink/blob/7bebd2d9fac517c28afc24c0c034d77cfe2b43a6/flink-runtime/src/main/java/org/apache/flink/runtime/metrics/dump/QueryScopeInfo.java#L234.

Response

Code Block
{
	"id": "<source_name>.<metric_name1>",
	"id": "<source_name>.<metric_name2>",
	...
	
}

This response is consistent with other APIs and extends from the same utility classes (AbstractMetricsHandler).

`coordinator-metrics` makes it obvious that the metrics are from the OperatorCoordinator, not to be confused with something like `operator-metrics` (which operator is it?). This endpoint should also be integrated with the Flink UI.

...

1. Exposing the operator id in the API. e.g. /jobs/<jobid>/vertices/<vertexid>/operators/<operatorid>/metrics.

2 considerations: 

1. Integrate Flink UI to show source coordinator metrics

The Flink UI currently doesn't expose per operator metrics, only task metrics. For operator metrics, metric reporters provide that extensibility to expose operator granularity metrics. So, the operator id is unnecessary for this case.

2. Integrate Flink Kubernetes Operator to read autoscaling metrics from source enumerator

The K8s operator currently reads vertex metrics from the Flink Metric REST API to perform autoscaling. In this situation, the operator id is unnecessary as well and in fact, a vertex can only contain 1 source. Therefore, we don't need a parameter for the operator id.