[
https://issues.apache.org/jira/browse/BEAM-6172?focusedWorklogId=173043&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-173043
]
ASF GitHub Bot logged work on BEAM-6172:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Dec/18 19:22
Start Date: 07/Dec/18 19:22
Worklog Time Spent: 10m
Work Description: mwylde commented on a change in pull request #7207:
[BEAM-6172] Adjust Flink metric names / Add metric reporting tests
URL: https://github.com/apache/beam/pull/7207#discussion_r239917917
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/metrics/FlinkMetricContainer.java
##########
@@ -144,9 +145,9 @@ private void
updateGauge(Iterable<MetricResult<GaugeResult>> gauges) {
}
}
- private static String getFlinkMetricNameString(String prefix,
MetricResult<?> metricResult) {
- return prefix
- + METRIC_KEY_SEPARATOR
+ @VisibleForTesting
+ static String getFlinkMetricNameString(MetricResult<?> metricResult) {
+ return METRIC_KEY_SEPARATOR
Review comment:
With this I get
```
10.100.208.242.taskmanager.4f13adf64e7315b7198911465ca44119.BeamApp-mwylde-1207183134-fd6cc74c.group.0..group.org.apache.beam.runners.core.ReduceFnRunner.droppedDueToClosedWindow
```
It appears that Flink already includes the step, so in the cases I've seen
this can be
```
return
metricResult.getName().getNamespace()
+ METRIC_KEY_SEPARATOR
+ metricResult.getName().getName();
```
which gives you
```
10.100.208.242.taskmanager.4f13adf64e7315b7198911465ca44119.BeamApp-mwylde-1207185706-ce63a421.group.0.org.apache.beam.runners.core.ReduceFnRunner.droppedDueToClosedWindow
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 173043)
Time Spent: 50m (was: 40m)
> Flink metrics are not generated in standard format
> --------------------------------------------------
>
> Key: BEAM-6172
> URL: https://issues.apache.org/jira/browse/BEAM-6172
> Project: Beam
> Issue Type: Improvement
> Components: runner-flink
> Affects Versions: 2.8.0
> Reporter: Micah Wylde
> Assignee: Maximilian Michels
> Priority: Minor
> Time Spent: 50m
> Remaining Estimate: 0h
>
> The metrics that the flink runner exports do not follow the standard format
> used by Flink, and doesn't respect Flink metric configuration options.
> For example (with the default metrics configuration) beam produces a metric:
> {code}
> 10-100-209-71.taskmanager.0f29b420b63fea58f6f321bc0cbf45f3.BeamApp-mwylde-1203224439-a7d8fdf6.group.0.__counter__group__org-apache-beam-runners-core-ReduceFnRunner__droppedDueToClosedWindow
> {code}
> whereas a native Flink metric looks like:
> {code}
> 10-100-209-71.taskmanager.0f29b420b63fea58f6f321bc0cbf45f3.BeamApp-mwylde-1203224439-a7d8fdf6.Source-Custom-Source-7Kinesis-None-beam-env-docker-v1-0-ToKeyedWorkItem.0.numRecordsOut
> {code}
> In particular, Beam should respect the
> [metric.scope.delimiter|https://ci.apache.org/projects/flink/flink-docs-release-1.5/ops/config.html#metrics-scope-delimiter]
> configuration for separating components of a metric (currently it uses
> "__"), and should not include the type of metric (counter, gauge, etc.).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)