The Candela Sidecar is a lightweight Go proxy (< 5MB) built for production container environments. It provides LLM request proxying, OpenTelemetry tracing, cost calculation, and budget enforcement with minimal overhead.
Zero-config GCP auth via Application Default Credentials (ADC)
W3C Trace Context propagation — traceparent/tracestate headers
Async span export via Google Cloud Pub/Sub or OTLP
Cost calculation with the shared costcalc engine
Budget enforcement via Firestore
Single static binary — < 5MB, no runtime dependencies
Route Provider Auth /proxy/google/*Google Gemini (native format) ADC /proxy/openai/*OpenAI API API key in config /proxy/anthropic/*Anthropic (via Vertex AI) ADC
Environment variables:
Variable Required Description GCP_PROJECT✅ GCP project for Vertex AI and Pub/Sub GCP_REGIONVertex AI region (default: us-central1) PUBSUB_TOPICPub/Sub topic for span export OTLP_ENDPOINTOTLP HTTP endpoint for span export PORTListen port (default: 8080) FIRESTORE_DBFirestore database for budget enforcement
docker run -p 8080:8080 \
-e GCP_PROJECT=my-project \
-e PUBSUB_TOPIC=candela-spans \
ghcr.io/candelahq/candela-sidecar:latest
value : " http://localhost:8080/proxy/google "
image : ghcr.io/candelahq/candela-sidecar:latest
apiVersion : serving.knative.dev/v1
- image : ghcr.io/candelahq/candela-sidecar:latest
candela-sidecarcandela-serverBest for Containers, CI, production Local dev with UI Size < 5MB binary Full server Storage Pub/Sub + OTLP export DuckDB, SQLite, BigQuery Budget enforcement Yes (via Firestore) Yes (via local store) UI None Dashboard at :3000 Default port :8080:8181
curl http://localhost:8080/healthz