/** * Builds and returns {@link KafkaAvroEventReporter}. * * @param brokers string of Kafka brokers * @param topic topic to send metrics to * @return KafkaAvroReporter */ public KafkaAvroEventReporter build(String brokers, String topic) throws IOException { this.brokers = brokers; this.topic = topic; return new KafkaAvroEventReporter(this); }
@Override public KafkaEventReporter.Builder<? extends KafkaEventReporter.Builder> getBuilder(MetricContext context, Pusher pusher) { return KafkaAvroEventReporter.forContext(context).withKafkaPusher(pusher); }
KafkaAvroEventReporter.forContext(context).withKafkaPusher(pusher) .withSchemaRegistry(registry).build("localhost:0000", "topic");
/** * Builds and returns {@link KafkaAvroEventReporter}. * * @param brokers string of Kafka brokers * @param topic topic to send metrics to * @return KafkaAvroReporter */ public KafkaAvroEventReporter build(String brokers, String topic) throws IOException { this.brokers = brokers; this.topic = topic; return new KafkaAvroEventReporter(this); }