Prometheus Integration

Open-source API gateway for microservices. Expose comprehensive runtime metrics for seamless Prometheus scraping.

$ fluxgate config set metrics.enabled true
$ fluxgate config set metrics.port 9090
$ fluxgate config set metrics.path /metrics
Configuration

Expose the Metrics Endpoint

FluxGate publishes a /metrics endpoint in OpenMetrics format by default. Enable the telemetry module in your fluxgate.yaml to allow Prometheus to scrape latency percentiles, request counts, and upstream health checks.

Set the scrape interval to 15s and ensure your Prometheus service account has network access to the gateway pod or host. The endpoint automatically tags metrics with route_id, upstream_host, and method labels for precise filtering.

scrape_configs:
  - job_name: fluxgate-gateway
    metrics_path: /metrics
    static_configs:
      - targets: ["fluxgate-primary:9090"]
Download fluxgate.yaml Snippet View Scrape Best Practices
Telemetry

Available Metrics

The gateway exports over 40 core metrics covering request throughput, circuit breaker state, rate limiter quotas, and TLS handshake duration.

Request Latency Histograms

fluxgate_http_request_duration_seconds tracks p50, p90, and p99 response times per route. Granular buckets range from 5ms to 2s for high-traffic edge deployments.

Active Connections

fluxgate_upstream_active_connections reports concurrent TCP/HTTP2 sessions to backend services. Useful for autoscaling triggers and connection pool tuning.

Rate Limiter Quotas

fluxgate_ratelimiter_remaining_tokens exposes real-time token bucket states. Monitor client throttling events before they impact public API SLAs.

Circuit Breaker State

fluxgate_circuit_breaker_state outputs 0 (closed), 1 (open), or 2 (half-open) for each upstream group. Triggers immediate alerts during cascade failures.

Visualization

Grafana Dashboard Import

Skip the query writing. Our pre-built dashboard (ID: 18492) visualizes gateway throughput, error budgets, and upstream latency heatmaps out of the box.

The dashboard uses native PromQL queries aligned with the FluxGate metrics schema. It includes drill-down panels for route-level debugging, TLS certificate expiry tracking, and cache hit ratios. Compatible with Grafana 9.0+ and Mimir/Thanos backends.

{
  "dashboard": {
    "id": null,
    "uid": "fluxgate-ops-01",
    "title": "FluxGate Gateway Overview",
    "version": 14,
    "panels": [...]
  }
}
Import Dashboard JSON Explore Panel Queries