![JAR search and dependency download from the Maven repository](/logo.png)
io.pyroscope.javaagent.api.Exporter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of agent Show documentation
Show all versions of agent Show documentation
The Java profiling agent for Pyroscope.io. Based on async-profiler.
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