All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.pyroscope.javaagent.api.Exporter Maven / Gradle / Ivy

package io.pyroscope.javaagent.api;

import io.pyroscope.javaagent.Snapshot;

public interface Exporter {
    /**
     * PyroscopeAgent expects {@link Exporter#export(Snapshot)} method to be synchronous to profiling schedule, and should return as fast as
     * possible. 
See QueuedExporter for an asynchronous implementation example.
* Here is an example of an alternative to {@link io.pyroscope.javaagent.impl.PyroscopeExporter} *
     * class KafkaExporter implements Exporter {
     *     final KafkaProducer<String, String> kafkaProducer;
     *     private MyExporter(KafkaProducer<String, String> producer) {
     *         this.kafkaProducer = producer;
     *     }
     *     @Override
     *     public void export(Snapshot snapshot) {
     *         kafkaProducer.send(new ProducerRecord<>("test.app.jfr", gson.toJson(snapshot)));
     *     }
     * }
     * 
* */ void export(Snapshot snapshot); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy