// Path: elasticsearch-plugin/src/main/java/pl/suchenia/elasticsearchPrometheusMetrics/writer/PrometheusFormatWriter.java
// public class PrometheusFormatWriter {
//     private final StringWriter writer = new StringWriter();
//     private final Map<String, String> globalLabels;
// 
//     public PrometheusFormatWriter(Map<String, String> globalLabels) {
//         this.globalLabels = globalLabels;
//     }
// 
//     public SingleMetricsDefinitionBuilder addGauge(String name) {
//         return new SingleMetricsDefinitionBuilder(MetricType.GAUGE, writer, name, globalLabels);
//     }
// 
//     public SingleMetricsDefinitionBuilder addCounter(String name) {
//         return new SingleMetricsDefinitionBuilder(MetricType.COUNTER, writer, name, globalLabels);
//     }
// 
//     public SummaryMetricsDefinitionBuilder addSummary(String name) {
//         return new SummaryMetricsDefinitionBuilder(writer, name, globalLabels);
//     }
// 
//     public String toString() {
//         return writer.toString();
//     }
// }


import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.http.HttpStats;
import pl.suchenia.elasticsearchPrometheusMetrics.writer.PrometheusFormatWriter;
package pl.suchenia.elasticsearchPrometheusMetrics.generators;


public class HttpMetricsGenerator extends MetricsGenerator<HttpStats> {
    private static final Logger logger = Loggers.getLogger(HttpMetricsGenerator.class, "init");

    @Override
// Path: elasticsearch-plugin/src/main/java/pl/suchenia/elasticsearchPrometheusMetrics/writer/PrometheusFormatWriter.java
// public class PrometheusFormatWriter {
//     private final StringWriter writer = new StringWriter();
//     private final Map<String, String> globalLabels;
// 
//     public PrometheusFormatWriter(Map<String, String> globalLabels) {
//         this.globalLabels = globalLabels;
//     }
// 
//     public SingleMetricsDefinitionBuilder addGauge(String name) {
//         return new SingleMetricsDefinitionBuilder(MetricType.GAUGE, writer, name, globalLabels);
//     }
// 
//     public SingleMetricsDefinitionBuilder addCounter(String name) {
//         return new SingleMetricsDefinitionBuilder(MetricType.COUNTER, writer, name, globalLabels);
//     }
// 
//     public SummaryMetricsDefinitionBuilder addSummary(String name) {
//         return new SummaryMetricsDefinitionBuilder(writer, name, globalLabels);
//     }
// 
//     public String toString() {
//         return writer.toString();
//     }
// }


// Path: elasticsearch-plugin/src/main/java/pl/suchenia/elasticsearchPrometheusMetrics/generators/HttpMetricsGenerator.java
import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.http.HttpStats;
import pl.suchenia.elasticsearchPrometheusMetrics.writer.PrometheusFormatWriter;

package pl.suchenia.elasticsearchPrometheusMetrics.generators;


public class HttpMetricsGenerator extends MetricsGenerator<HttpStats> {
    private static final Logger logger = Loggers.getLogger(HttpMetricsGenerator.class, "init");

    @Override
    public PrometheusFormatWriter generateMetrics(PrometheusFormatWriter writer, HttpStats httpStats) {