Skip to content
Advertisement

Incoming kafka metrics are not detected in Appdynamcis – springkafka

We are using springboot and springkafka to consume and process the messages, and Appdynamics for capturing the Performance metrics.

Appdynamics is capturing the out going topics and metrics, but not detecting the incoming topic and the metrics.The solutions we tried

  1. Custom configured the topics name in the backend

  2. Set enable-kafka-consumer to true

  3. Custom-interceptors.xml mentioned below

     <custom-interceptors>
     <custom-interceptor>
         <interceptor-class-name>com.singularity.KafkaMarkerMethodInterceptor</interceptor-class-name>
         <match-class type="matches-class">
             <name filter-type="equals">my-fully-qualified-class-name</name>
         </match-class>
         <match-method>
             <name>my-method-name</name>
         </match-method>
     </custom-interceptor>
    

In any of the cases the topics/metrics is not getting discovered. We would require help to solve this.

Reference:

Advertisement

Answer

All settings are correct, but instead of our class name we have to point to the spring kafka class in custom-interceptors.xml

<custom-interceptors>
    <custom-interceptor>
        <interceptor-class-name>com.singularity.KafkaMarkerMethodInterceptor</interceptor-class-name>
        <match-class type="matches-class">
            <name filter-type="equals">org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer</name>
        </match-class>
        <match-method>
            <name>run</name>
        </match-method>
    </custom-interceptor>
</custom-interceptors>
Advertisement