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.
This commit is contained in:
Eric Anderson 2024-07-24 21:30:10 -07:00 committed by GitHub
parent eb4cdf7959
commit b108ed3ddf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -89,4 +89,9 @@ abstract class PartialMetricInstrument implements MetricInstrument {
public boolean isEnableByDefault() {
return enableByDefault;
}
@Override
public String toString() {
return getClass().getName() + "(" + getName() + ")";
}
}