public interface Exporter
| Modifier and Type | Method and Description |
|---|---|
void |
export(Snapshot snapshot)
PyroscopeAgent expects
export(Snapshot) method to be synchronous to profiling schedule, and should return as fast as
possible. |
void export(Snapshot snapshot)
export(Snapshot) method to be synchronous to profiling schedule, and should return as fast as
possible. 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)));
}
}