Skip to content

P0: Prometheus metrics hooks — no-op default + optional exporter #22

@ZanzyTHEbar

Description

@ZanzyTHEbar

Context: Implement minimal metrics hooks across DB and tool handlers with a no-op default recorder and optional Prometheus exporter controlled by env.

Acceptance criteria:

  • Minimal Recorder interface with counters/histograms for DB ops and tools
  • No-op default implementation active when METRICS_PROMETHEUS is unset
  • Prometheus recorder enabled when METRICS_PROMETHEUS=true, served on METRICS_ADDR (default :9090)
  • /metrics and /healthz endpoints exposed
  • Latency histograms and totals for tool handlers and DB ops
  • Lightweight result-size observations (sampled) and pool/stmt cache metrics
  • Idempotent initialization (safe to call from multiple places)
  • README updated with usage and recommended buckets

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions