@ -36,25 +36,30 @@ import org.springframework.util.MimeTypeUtils;
public enum TextOutputFormat implements Producible < TextOutputFormat > {
public enum TextOutputFormat implements Producible < TextOutputFormat > {
/ * *
/ * *
* OpenMetrics text version 1.0 .0 .
* Prometheus text version 0.0 .4 .
* /
* /
CONTENT_TYPE_ OPENMETRICS_1 00( TextFormat . CONTENT_TYPE_ OPENMETRICS_1 00) {
CONTENT_TYPE_ 004 ( TextFormat . CONTENT_TYPE_ 004 ) {
@Override
@Override
void write ( Writer writer , Enumeration < MetricFamilySamples > samples ) throws IOException {
void write ( Writer writer , Enumeration < MetricFamilySamples > samples ) throws IOException {
TextFormat . writeOpenMetrics100 ( writer , samples ) ;
TextFormat . write004 ( writer , samples ) ;
}
@Override
public boolean isDefault ( ) {
return true ;
}
}
} ,
} ,
/ * *
/ * *
* Prometheus text version 0.0 .4 .
* OpenMetrics text version 1.0 .0 .
* /
* /
CONTENT_TYPE_ 004 ( TextFormat . CONTENT_TYPE_ 004 ) {
CONTENT_TYPE_ OPENMETRICS_1 00( TextFormat . CONTENT_TYPE_ OPENMETRICS_1 00) {
@Override
@Override
void write ( Writer writer , Enumeration < MetricFamilySamples > samples ) throws IOException {
void write ( Writer writer , Enumeration < MetricFamilySamples > samples ) throws IOException {
TextFormat . write 004 ( writer , samples ) ;
TextFormat . write OpenMetrics1 00( writer , samples ) ;
}
}
} ;
} ;