|
1 | 1 | package io.prometheus.metrics.core.metrics;
|
2 | 2 |
|
3 | 3 | import io.prometheus.metrics.com_google_protobuf_3_21_7.TextFormat;
|
| 4 | +import io.prometheus.metrics.core.datapoints.DistributionDataPoint; |
| 5 | +import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil; |
4 | 6 | import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
|
5 | 7 | import io.prometheus.metrics.expositionformats.PrometheusProtobufWriter;
|
6 | 8 | import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_3_21_7.Metrics;
|
7 |
| -import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil; |
8 |
| -import io.prometheus.metrics.model.snapshots.MetricSnapshots; |
9 |
| -import io.prometheus.metrics.tracer.common.SpanContext; |
10 |
| -import io.prometheus.metrics.tracer.initializer.SpanContextSupplier; |
11 | 9 | import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
|
12 | 10 | import io.prometheus.metrics.model.snapshots.Exemplar;
|
13 | 11 | import io.prometheus.metrics.model.snapshots.Exemplars;
|
14 | 12 | import io.prometheus.metrics.model.snapshots.HistogramSnapshot;
|
15 | 13 | import io.prometheus.metrics.model.snapshots.Labels;
|
16 |
| -import io.prometheus.metrics.core.datapoints.DistributionDataPoint; |
| 14 | +import io.prometheus.metrics.model.snapshots.MetricSnapshots; |
| 15 | +import io.prometheus.metrics.tracer.common.SpanContext; |
| 16 | +import io.prometheus.metrics.tracer.initializer.SpanContextSupplier; |
17 | 17 | import org.junit.After;
|
18 | 18 | import org.junit.Assert;
|
19 | 19 | import org.junit.Before;
|
@@ -1043,19 +1043,9 @@ public void testIllegalLabelNamePrefix() {
|
1043 | 1043 | .withLabelNames("__hello");
|
1044 | 1044 | }
|
1045 | 1045 |
|
1046 |
| - @Test(expected = IllegalArgumentException.class) |
1047 |
| - public void testIllegalLabelNameDot() { |
1048 |
| - // The Prometheus team are investigating to allow dots in future Prometheus versions, but for now it's invalid. |
1049 |
| - // The reason is that you cannot use illegal label names in the Prometheus query language. |
1050 |
| - Histogram.newBuilder() |
1051 |
| - .withName("test") |
1052 |
| - .withLabelNames("http.status"); |
1053 |
| - } |
1054 |
| - |
1055 | 1046 | @Test(expected = IllegalArgumentException.class)
|
1056 | 1047 | public void testIllegalName() {
|
1057 |
| - Histogram.newBuilder() |
1058 |
| - .withName("server.durations"); |
| 1048 | + Histogram.newBuilder().withName("my_namespace/server.durations"); |
1059 | 1049 | }
|
1060 | 1050 |
|
1061 | 1051 | @Test(expected = IllegalArgumentException.class)
|
|
0 commit comments