scwhittle commented on code in PR #33503:
URL: https://github.com/apache/beam/pull/33503#discussion_r1977517724
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/MetricName.java:
##########
@@ -48,12 +53,26 @@ public String toString() {
public static MetricName named(String namespace, String name) {
checkArgument(!Strings.isNullOrEmpty(namespace), "Metric namespace must be
non-empty");
checkArgument(!Strings.isNullOrEmpty(name), "Metric name must be
non-empty");
- return new AutoValue_MetricName(namespace, name);
+ return new AutoValue_MetricName(namespace, name, ImmutableMap.of());
+ }
+
+ public static MetricName named(
+ String namespace, String name, ImmutableMap<String, String> labels) {
Review Comment:
a possible fix for the vendor issue would be to change this back to map and
do
ImmutableMap.copyOf when passing to AutoValue.
This might be nicer api since it makes tests easier etc. If callers use
ImmutableMap there is no performance overhead for the copy.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]