Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion prometheus-metrics-exposition-formats-no-protobuf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>prometheus-metrics-exposition-textformats</artifactId>
<version>1.3.10</version>
<version>1.4.1</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,19 @@ public static ExpositionFormats init()
return init(PrometheusProperties.get().getExporterProperties());
}

@SuppressWarnings("deprecation")
public static ExpositionFormats init(final ExporterProperties properties)
{
return new ExpositionFormats(
null,
new PrometheusTextFormatWriter(properties.getIncludeCreatedTimestamps()),
new OpenMetricsTextFormatWriter(
properties.getIncludeCreatedTimestamps(), properties.getExemplarsOnAllMetricTypes()));
PrometheusTextFormatWriter.builder()
.setIncludeCreatedTimestamps(properties.getIncludeCreatedTimestamps())
.setTimestampsInMs(properties.getPrometheusTimestampsInMs())
.build(),
OpenMetricsTextFormatWriter.builder()
.setCreatedTimestampsEnabled(properties.getIncludeCreatedTimestamps())
.setExemplarsOnAllMetricTypesEnabled(properties.getExemplarsOnAllMetricTypes())
.build());
}

public ExpositionFormatWriter findWriter(final String acceptHeader)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
package io.prometheus.metrics.expositionformats;

import java.io.IOException;
import java.io.OutputStream;

import io.prometheus.metrics.config.EscapingScheme;
import io.prometheus.metrics.model.snapshots.MetricSnapshots;


Expand All @@ -40,7 +40,10 @@ public String getContentType()
}

@Override
public void write(final OutputStream out, final MetricSnapshots metricSnapshots) throws IOException
public void write(
final OutputStream out,
final MetricSnapshots metricSnapshots,
final EscapingScheme escapingScheme)
{
// Do nothing
}
Expand Down