Skip to content

Commit c88ee73

Browse files
committed
fix: address OpenMetrics suffix CI failures
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
1 parent 68e1bd2 commit c88ee73

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

‎docs/apidiffs/current_vs_latest/prometheus-metrics-config.txt‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/OpenMetrics2TextFormatWriterTest.java‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,7 @@ private String writeWithNativeHistograms(MetricSnapshots snapshots) throws IOExc
123123
OpenMetrics2TextFormatWriter writer =
124124
OpenMetrics2TextFormatWriter.builder()
125125
.setOpenMetrics2Properties(
126-
OpenMetrics2Properties.builder()
127-
.nativeHistograms(true)
128-
.suffixes(false)
129-
.build())
126+
OpenMetrics2Properties.builder().nativeHistograms(true).suffixes(false).build())
130127
.build();
131128
return writeWithWriter(snapshots, writer);
132129
}

‎prometheus-metrics-exporter-common/src/test/java/io/prometheus/metrics/exporter/common/PrometheusScrapeHandlerTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void testOpenMetrics2DoesNotEscapeUtf8NamesByDefault() throws IOException {
200200
for (boolean contentNegotiation : new boolean[] {true, false}) {
201201
String body =
202202
scrapeUtf8Counter(contentNegotiation, "application/openmetrics-text;version=2.0.0");
203-
assertThat(body).contains("\"my.counter\"").doesNotContain("my_counter");
203+
assertThat(body).contains("\"my.counter_total\"").doesNotContain("my_counter");
204204
}
205205
}
206206

‎prometheus-metrics-exposition-textformats/src/main/java/io/prometheus/metrics/expositionformats/OpenMetricsTextFormatWriter.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,7 @@ void writeSummary(Writer writer, SummarySnapshot snapshot, EscapingScheme scheme
237237
writeSummary(writer, snapshot, scheme, getMetadataName(snapshot.getMetadata(), scheme));
238238
}
239239

240-
void writeSummary(
241-
Writer writer, SummarySnapshot snapshot, EscapingScheme scheme, String name)
240+
void writeSummary(Writer writer, SummarySnapshot snapshot, EscapingScheme scheme, String name)
242241
throws IOException {
243242
boolean metadataWritten = false;
244243
MetricMetadata metadata = snapshot.getMetadata();

0 commit comments

Comments
 (0)