[INFRAUTILS-34] Metrics API with Enum instead of String typed labels Created: 12/Apr/18 Updated: 24/Sep/21 Resolved: 24/Sep/21 |
|
| Status: | Resolved |
| Project: | infrautils |
| Component/s: | metrics |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Michael Vorburger | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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(); |
| Comments |
| Comment by Robert Varga [ 24/Sep/21 ] |
|
We will be ditching metrics-api in INTRAUTILS-80. |