title: How to define new metrics for custom Processor (and make them available in jconsole)?
body: <p>i have a processor which should produce kstream JMX metrics:</p>
  
  <pre><code>public class ProcessorJMX implements Processor&lt;String, GenericRecord&gt; {
    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() { }
  }
  </code></pre>
  
  <p>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? </p>
  
  <p>do i have to do something else before it becomes visible?</p>
  
  <p><a href="https://i.stack.imgur.com/pWCgq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pWCgq.png" alt="enter image description here"></a></p>
  
  <p>here are the properties i am using:</p>
  
  <pre><code>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");
  </code></pre>
  
  <p>what is wrong with this config?</p>