mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Enforce very basic URL-like metric names
This change enforces URL-like metric names to match the behavior of Stackdriver. The StackdriverWriter no longer prepends a slash, which was a crutch. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=130537347
This commit is contained in:
parent
b45c2ca2ee
commit
564bbdef83
2 changed files with 3 additions and 2 deletions
|
@ -155,7 +155,7 @@ public class StackdriverWriter implements MetricWriter {
|
|||
static <V> MetricDescriptor createMetricDescriptor(
|
||||
google.registry.monitoring.metrics.Metric<V> metric) {
|
||||
return new MetricDescriptor()
|
||||
.setType(METRIC_DOMAIN + "/" + metric.getMetricSchema().name())
|
||||
.setType(METRIC_DOMAIN + metric.getMetricSchema().name())
|
||||
.setDescription(metric.getMetricSchema().description())
|
||||
.setDisplayName(metric.getMetricSchema().valueDisplayName())
|
||||
.setValueType(ENCODED_METRIC_TYPES.get(metric.getValueClass()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue