Get the singleton ServerMetricsManager instance.
This is the recommended way to access metrics in production code. The instance is lazily initialized on first access.
The singleton ServerMetricsManager instance
import { getServerMetrics } from './telemetry/metrics.js';const metrics = getServerMetrics();metrics.recordRequest('tool_name', 150, true); Copy
import { getServerMetrics } from './telemetry/metrics.js';const metrics = getServerMetrics();metrics.recordRequest('tool_name', 150, true);
Get the singleton ServerMetricsManager instance.
This is the recommended way to access metrics in production code. The instance is lazily initialized on first access.