Flagsmith / Flagsmith/edge-proxy-rs

Add runtime performance and cache metrics to the edge proxy

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2
Forks
1
Avg merge
4h 20m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the edge proxy's configuration, HTTP route registration, async runtime, and flag-cache implementation. Compare the backend's PROMETHEUS_ENABLED and /metrics behavior, then define which process, runtime, cache, and optional OTLP metrics are feasible. Done means an opt-in metrics endpoint exposes the agreed metrics and tests verify configuration and output.

Written by the indexing model from the issue text.

Assessment

Tech stack
prometheus, rust
Domain
api, backend, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.