Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-3241

JmxReporter produces invalid JSON when a value is Infinity

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • metrics
    • None

    Description

      We recently realized that the when JmxReporter$KafkaMbean has some metrics with the value Infinity, the JSON created is invalid since the string value "Infinity" or "-Infinity" are not in double-quotes! Here's an example:

       {
          "name" : "kafka.producer:type=producer-node-metrics,client-id=producer-1,node-id=node-1",
          "modelerType" : "org.apache.kafka.common.metrics.JmxReporter$KafkaMbean",
          "request-rate" : 0.0,
          "request-size-avg" : 0.0,
          "incoming-byte-rate" : 0.0,
          "request-size-max" : -Infinity,
          "outgoing-byte-rate" : 0.0,
          "request-latency-max" : -Infinity,
          "request-latency-avg" : 0.0,
          "response-rate" : 0.0
        }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              babakbehzad Babak Behzad
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: