-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just a minor comment.
...ore-java/src/main/java/org/apache/beam/runners/core/metrics/SimpleMonitoringInfoBuilder.java
Outdated
Show resolved
Hide resolved
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
throw
on 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)