@@ -48,6 +48,7 @@ public static class CounterDataPointSnapshot extends DataPointSnapshot {
4848
4949 private final double value ;
5050 @ Nullable private final Exemplar exemplar ;
51+
5152 /** Optional metric name used only in validation error messages. */
5253 @ Nullable private final String metricName ;
5354
@@ -64,20 +65,7 @@ public static class CounterDataPointSnapshot extends DataPointSnapshot {
6465 */
6566 public CounterDataPointSnapshot (
6667 double value , Labels labels , @ Nullable Exemplar exemplar , long createdTimestampMillis ) {
67- this (value , labels , exemplar , createdTimestampMillis , 0 , null );
68- }
69-
70- /**
71- * Same as {@link #CounterDataPointSnapshot(double, Labels, Exemplar, long)} with an optional
72- * metric name included in validation error messages when the value is negative.
73- */
74- public CounterDataPointSnapshot (
75- double value ,
76- Labels labels ,
77- @ Nullable Exemplar exemplar ,
78- long createdTimestampMillis ,
79- @ Nullable String metricName ) {
80- this (value , labels , exemplar , createdTimestampMillis , 0 , metricName );
68+ this (value , labels , exemplar , createdTimestampMillis , 0 , false , null );
8169 }
8270
8371 /**
@@ -95,29 +83,6 @@ public CounterDataPointSnapshot(
9583 this (value , labels , exemplar , createdTimestampMillis , scrapeTimestampMillis , false , null );
9684 }
9785
98- /**
99- * Constructor with scrape timestamp and optional metric name for validation messages.
100- *
101- * @see #CounterDataPointSnapshot(double, Labels, Exemplar, long, long)
102- */
103- @ SuppressWarnings ("this-escape" )
104- public CounterDataPointSnapshot (
105- double value ,
106- Labels labels ,
107- @ Nullable Exemplar exemplar ,
108- long createdTimestampMillis ,
109- long scrapeTimestampMillis ,
110- @ Nullable String metricName ) {
111- this (
112- value ,
113- labels ,
114- exemplar ,
115- createdTimestampMillis ,
116- scrapeTimestampMillis ,
117- false ,
118- metricName );
119- }
120-
12186 @ SuppressWarnings ("this-escape" )
12287 public CounterDataPointSnapshot (
12388 double value ,
@@ -231,6 +196,7 @@ public CounterDataPointSnapshot build() {
231196 exemplar ,
232197 createdTimestampMillis ,
233198 scrapeTimestampMillis ,
199+ false ,
234200 metricName );
235201 }
236202
0 commit comments