Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-3101

Fix unexpected metrics registration in StormMetricsRegistry

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: storm-server

      Description

      Metrics that are registered using StormMetricRegistry all added through static method from the registry class, and attached to a singleton MetricRegistry object per process. Currently most metrics are bound to classes (static), so the issue occurs when metrics from irrelevant components are accidentally registered in class initialization phase.

      For example, a process running supervisor daemon will incorrectly register metrics from nimbus when BasicContainer class is initialized and statically imports "org.apache.storm.daemon.nimbus.Nimbus.MIN_VERSION_SUPPORT_RPC_HEARTBEAT", which triggers initialization of Nimbus class and all metrics registration, even though no functionalities of nimbus daemon will be used and no nimbus metrics will be updated.

      This creates many garbage metrics and makes metrics hard to read. Therefore we should filter metrics registration by the type of daemon that the process actually runs.

      For implementation please see the pull request.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zhengdai Zhengdai Hu
                Reporter:
                zhengdai Zhengdai Hu
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3.5h
                  3.5h