Repository navigation
[BEAM-6361][BEAM-6364] fix user-metric-prefix checking in Flink portable metrics update - #7408
Conversation
| when(metricGroup.counter("ns1.metric1")).thenReturn(userCounter); | ||
|
|
||
| SimpleCounter elemCounter = new SimpleCounter(); | ||
| when(metricGroup.counter("beam.metric:element_count:v1")).thenReturn(elemCounter); |
There was a problem hiding this comment.
The current namespace parsing logic above just takes the everything after the first : as the "name", so this name is metric:element_count:v1.
I don't see any reason that having additional :s in the "name" is a problem, but I saw a note about it (only related to user metrics, though) in SimpleMonitoringInfoBuilder, so open to whether there's a better way to think about it here.
There was a problem hiding this comment.
I suppose user-defined counters should not be able to change the namespace via colons.
|
python failure seems unrelated, and the same as in 3385 (#7416), 3382 (#7300), 3370 (#7407), and perhaps others |
|
Run Python PreCommit |
This error is tracking in https://issues.apache.org/jira/browse/BEAM-6280. |
mxm
left a comment
There was a problem hiding this comment.
Looks good to me. Just a minor comment.
| when(metricGroup.counter("ns1.metric1")).thenReturn(userCounter); | ||
|
|
||
| SimpleCounter elemCounter = new SimpleCounter(); | ||
| when(metricGroup.counter("beam.metric:element_count:v1")).thenReturn(elemCounter); |
There was a problem hiding this comment.
I suppose user-defined counters should not be able to change the namespace via colons.
|
Run Portable_Python PreCommit |
|
Run Java PreCommit |
|
|
If it's only that test failing, it's fine to merge. All other tests still run. |
|
Looks like everything passed the second time around, so this should be good to go |
two small follow-ups to #7183:
throwon as-yet-unsupported metrics typesThey're each pretty small, and the tests of the latter depend on the former, so I put them both in this PR; let me know if it would be better if I split them out.
R: @ajamato
R: @robertwb (we'd previously discussed the BEAM-6364 portion of this in particular)
Post-Commit Tests Status (on master branch)