Skip to content

Add runtime performance and cache metrics to the edge proxy #13

Description

@adamvialpando

The edge proxy exposes structured JSON logs and health endpoints but no metrics. Operators have no visibility into the running instance resource usage or how effectively the flag cache is serving requests. The Flagsmith API already supports a Prometheus /metrics endpoint via PROMETHEUS_ENABLED plus OTLP export, so the edge proxy is the gap in an otherwise observable stack.

Proposed: expose a Prometheus /metrics endpoint, opt-in via config (PROMETHEUS_ENABLED, mirroring the backend). Optional OTLP export for shops already on OpenTelemetry.

Runtime / process performance:

  • CPU time (process_cpu_seconds_total)
  • Resident and virtual memory (process_resident_memory_bytes, process_virtual_memory_bytes)
  • Open file descriptors (process_open_fds)
  • Process uptime (process_start_time_seconds)
  • Runtime stats where feasible: worker thread count, active tasks, queue depth (it is an async runtime)

Cache (if possible):

  • Hits and misses as counters, so hit ratio is derivable
  • Current entries vs capacity (occupancy)
  • Evictions

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions