mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Add method to create and register EventMetrics
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=132346375
This commit is contained in:
parent
2ba9b01a13
commit
0538c1e210
3 changed files with 65 additions and 0 deletions
|
@ -42,6 +42,21 @@ public final class MetricRegistryImpl implements MetricRegistry {
|
|||
return INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EventMetric newEventMetric(
|
||||
String name,
|
||||
String description,
|
||||
String valueDisplayName,
|
||||
ImmutableSet<LabelDescriptor> labels,
|
||||
DistributionFitter distributionFitter) {
|
||||
EventMetric metric =
|
||||
new EventMetric(name, description, valueDisplayName, distributionFitter, labels);
|
||||
registerMetric(name, metric);
|
||||
logger.info("Registered new event metric: " + name);
|
||||
|
||||
return metric;
|
||||
}
|
||||
|
||||
@Override
|
||||
@CanIgnoreReturnValue
|
||||
public <V> Metric<V> newGauge(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue