Skip to content

Commit b108ed3

Browse files
authored
api: Give instruments a toString() including their name
This makes it much easier when testing to understand what the values/arguments are at various parts of the code.
1 parent eb4cdf7 commit b108ed3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/src/main/java/io/grpc/PartialMetricInstrument.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,9 @@ public List<String> getOptionalLabelKeys() {
8989
public boolean isEnableByDefault() {
9090
return enableByDefault;
9191
}
92+
93+
@Override
94+
public String toString() {
95+
return getClass().getName() + "(" + getName() + ")";
96+
}
9297
}

0 commit comments

Comments
 (0)