Typed metric name constants for MCP server and EP API instrumentation.
Using an enum prevents typos in metric names and enables IDE auto-complete throughout the codebase.
metricsService.incrementCounter(MetricName.EP_API_CALL_COUNT, 1);metricsService.incrementCounter(MetricName.EP_CACHE_HIT_COUNT, 1); Copy
metricsService.incrementCounter(MetricName.EP_API_CALL_COUNT, 1);metricsService.incrementCounter(MetricName.EP_CACHE_HIT_COUNT, 1);
Total EP API calls (label: endpoint)
endpoint
Failed EP API calls
Cache hits for EP API responses
Cache misses for EP API responses
Typed metric name constants for MCP server and EP API instrumentation.
Using an enum prevents typos in metric names and enables IDE auto-complete throughout the codebase.
Example