i have a processor which should produce kstream JMX metrics:
public class ProcessorJMX implements Processor<String, GenericRecord> {
private StreamsMetrics streamsMetrics;
private Sensor sensorStartTs;
@Override
public void init(ProcessorContext processorContext) {
streamsMetrics = processorContext.metrics();
sensorStartTs = streamsMetrics.addSensor("start_ts", Sensor.RecordingLevel.INFO);
}
@Override
public void process(String key, GenericRecord val) {
streamsMetrics.recordThroughput(sensorStartTs, Long.valueOf(val.get("start_ts").toString()));
}
@Override
public void punctuate(long l) { }
@Override
public void close() { }
}
then i use this on my output topic and start my integration test. but when i look in jconsole, i dont see this metric anywhere. where can i find it in jconsole under MBeans?
do i have to do something else before it becomes visible?
here are the properties i am using:
Properties testProperties = new Properties();
testProperties.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG,
CLUSTER.bootstrapServers());
testProperties.put("confluent.metrics.reporter.bootstrap.servers", CLUSTER.bootstrapServers());
testProperties.put("metrics.recording.level", "DEBUG");
testProperties.put("metric.reporters", "org.apache.kafka.common.metrics.JmxReporter");
what is wrong with this config?