Skip to main content
Glama

CodeGraph CLI MCP Server

by Jakedismo
metrics.rsโ€ข1 kB
use once_cell::sync::Lazy; use prometheus::{Histogram, HistogramOpts, IntCounter, IntGauge, Registry}; pub static REQUESTS_TOTAL: Lazy<IntCounter> = Lazy::new(|| IntCounter::new("lb_requests_total", "Total proxied requests").unwrap()); pub static FAILURES_TOTAL: Lazy<IntCounter> = Lazy::new(|| IntCounter::new("lb_failures_total", "Total failed proxy requests").unwrap()); pub static ACTIVE_CONNECTIONS: Lazy<IntGauge> = Lazy::new(|| IntGauge::new("lb_active_connections", "Active upstream connections").unwrap()); pub static LATENCY_HIST: Lazy<Histogram> = Lazy::new(|| { Histogram::with_opts(HistogramOpts::new( "lb_upstream_latency_seconds", "Upstream response latency", )) .unwrap() }); pub fn register(reg: &Registry) { reg.register(Box::new(REQUESTS_TOTAL.clone())).ok(); reg.register(Box::new(FAILURES_TOTAL.clone())).ok(); reg.register(Box::new(ACTIVE_CONNECTIONS.clone())).ok(); reg.register(Box::new(LATENCY_HIST.clone())).ok(); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jakedismo/codegraph-rust'

If you have feedback or need assistance with the MCP directory API, please join our Discord server