Kafka
  1. Kafka
  2. KAFKA-140

Expose total metrics through MBeans as well

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7
    • Component/s: core
    • Labels:
      None

      Description

      Mathias Herberts suggested on the ML that Kafka get the following additional metrics exposed through a bean

      totalflushms
      totalbytesread
      totalbyteswritten
      totalfetchrequestms
      totalproducerequestms

        Activity

        Hide
        Pierre-Yves Ritschard added a comment -

        The attached files fixes the issue

        Show
        Pierre-Yves Ritschard added a comment - The attached files fixes the issue
        Hide
        Pierre-Yves Ritschard added a comment -

        fix for kafka-140

        Show
        Pierre-Yves Ritschard added a comment - fix for kafka-140
        Hide
        Jun Rao added a comment -

        Pierre-Yves, thanks for creating the jira and submitting the patch.

        I wonder if SnapshotStats.getTotalMetric really gives what you want. This method currently gives you the aggregated metric for the latest 30-second window. My understanding is that you want to have an aggregated metric since the server is started. Is that right? If so, what you need to do is to create a new Stats in SnapshotStats that keeps tracks of the aggregated metric for the whole history.

        Show
        Jun Rao added a comment - Pierre-Yves, thanks for creating the jira and submitting the patch. I wonder if SnapshotStats.getTotalMetric really gives what you want. This method currently gives you the aggregated metric for the latest 30-second window. My understanding is that you want to have an aggregated metric since the server is started. Is that right? If so, what you need to do is to create a new Stats in SnapshotStats that keeps tracks of the aggregated metric for the whole history.
        Hide
        Pierre-Yves Ritschard added a comment -

        I indeed got that wrong, will update the patch.

        Show
        Pierre-Yves Ritschard added a comment - I indeed got that wrong, will update the patch.
        Hide
        Pierre-Yves Ritschard added a comment -

        Updated patch

        Show
        Pierre-Yves Ritschard added a comment - Updated patch
        Hide
        Jun Rao added a comment -

        Thanks Pierre-Yves, I just committed this patch.

        Show
        Jun Rao added a comment - Thanks Pierre-Yves, I just committed this patch.

          People

          • Assignee:
            Unassigned
            Reporter:
            Pierre-Yves Ritschard
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development