Uploaded image for project: 'infrautils'
  1. infrautils
  2. INFRAUTILS-34

Metrics API with Enum instead of String typed labels

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Medium
    • Resolution: Won't Do
    • None
    • None
    • metrics
    • None

    Description

      https://git.opendaylight.org/gerrit/#/c/70822/ gave me the idea that perhaps theĀ Metrics API could also directly support Enum instead of String typed labels, something like this:

      enum Reason {  exception, pktexception, name_not_found, info_not_found, subnet_not_found, egress_not_found };
      
      metricProvider.newCounter(..., "mac", "interface", Reason); // instead of ... "reason"
                          pktDropCounter.label(macAddress).label(interfaceName).label(Reason.info_not_found).increment();
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            vorburger Michael Vorburger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: