aidputils.agents.toolkit.service_metrics_util¶
Shared service-level metrics helpers for AIDP toolkit runtime instrumentation.
- class aidputils.agents.toolkit.service_metrics_util.ServiceMetricUtility[source]¶
Bases:
objectFactory and recorder for service-scoped OpenTelemetry metrics.
Unlike
aidputils.agents.toolkit.metrics_util.MetricUtility, this class uses a fixed meter scope so all runtime-service metrics are published under a consistent namespace.Create the shared service meter used by toolkit runtime components.
- AIDP_SERVICE_METER_SCOPE = 'aidp_agent_runtime_service_meter'¶
- create_counter(name: str, description: str = '')[source]¶
Create a counter under the service meter scope.
- increment_counter(counter, value: int = 1, attributes: dict | None = None) None[source]¶
Record an increment against a counter instrument.
- aidputils.agents.toolkit.service_metrics_util.get_service_metrics() ServiceMetricUtility[source]¶
Return the process-wide shared
ServiceMetricUtilityinstance.