[{"data":1,"prerenderedAt":77},["ShallowReactive",2],{"seo-verification":3,"blog-opentelemetry-grafana-tempo-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"title":9,"excerpt":10,"readTime":11,"views":12,"isPinned":13,"publishedAt":14,"category":15,"categories":21,"featuredImage":23,"bgImage":24,"posterImage":25,"relatedSolution":26,"intro":29,"sections":30,"ctaTitle":72,"ctaBody":73,"ctaButton":74,"ctaUrl":75,"relatedPosts":76},220,"opentelemetry-grafana-tempo-vps","Grafana Tempo and OpenTelemetry: distributed tracing on VPS","Deploy a full distributed tracing stack on your VPS with OpenTelemetry and Grafana Tempo, free from vendor lock-in and APM costs.",7,0,false,"2026-08-04T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},8,"Security & Monitoring","securite-monitoring","bg-rose-500\u002F10 text-rose-400","security",[22],{"id":16,"name":17,"slug":18,"color":19,"icon":20},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fopentelemetry-grafana-tempo-vps-poster.svg",{"categorySlug":27,"appSlug":28},"monitoring","grafana","Proprietary agents such as Datadog or New Relic charge for observability per feature, gradually locking you into their ecosystem. OpenTelemetry and Grafana Tempo offer a CNCF-graduated, backend-portable alternative that you can deploy entirely on your own VPS in under an hour.",[31,35,44,47,66,69],{"type":32,"title":33,"body":34},"h2","Why choose OpenTelemetry over a proprietary agent","OpenTelemetry is a CNCF-graduated project that unifies the three pillars of observability — traces, metrics and logs — under a vendor-neutral standard. Unlike Datadog or New Relic agents, the OTel Collector receives, transforms and exports telemetry to any compatible backend. You can switch storage without touching your application code. SDKs cover Node.js, Python, Go, Java, PHP, Ruby and most modern languages, making it a durable instrumentation foundation regardless of your stack.",{"type":36,"title":37,"items":38},"ul","What the OTel + Grafana Tempo stack gives you",[39,40,41,42,43],"**Index-free distributed tracing** — Grafana Tempo v2.x stores traces in compressed blocks (parquet) on local disk or object storage, with no Cassandra or Elasticsearch required.","**TraceQL queries** — Tempo's dedicated query language lets you filter traces by duration, service, error status or custom attributes in seconds.","**Multi-protocol compatibility** — Tempo accepts OTLP, Zipkin and Jaeger, so your existing applications connect without re-instrumentation.","**Lightweight on VPS** — 2 GB of RAM is enough for a dev or staging environment; in production under load, 4 GB provides a comfortable margin.","**Controlled cost** — a self-hosted VPS at 99 DH\u002Fmonth\u002Fmonth replaces a Datadog APM subscription billed at approximately $23 per host per month.",{"type":32,"title":45,"body":46},"VPS prerequisites","Your VPS must have at least 2 GB of RAM and root or sudo access. Docker Engine and Docker Compose v2 must be installed. Prepare a dedicated subdomain (for example `grafana.your-domain.com`) to expose the Grafana interface behind a TLS reverse proxy. Ports 4317 (OTLP\u002FgRPC) and 4318 (OTLP\u002FHTTP) must be open in your firewall to receive telemetry from your applications.",{"type":48,"title":49,"steps":50},"steps","Deploy the OTel stack in five steps",[51,54,57,60,63],{"title":52,"body":53},"Create the Docker Compose structure","Organise an `otel-stack\u002F` folder containing your configuration files and a `docker-compose.yml`. Define four services: `otel-collector`, `tempo`, `prometheus` and `grafana`. Connect them on an internal Docker network called `monitoring`. Mount a named volume `tempo-data` for trace persistence on the VPS disk.",{"title":55,"body":56},"Configure the OTel Collector (`otelcol-config.yaml`)","Declare two receivers: `otlp` on ports 4317 (gRPC) and 4318 (HTTP). In the `exporters` section, add `otlp\u002Ftempo` pointing to `tempo:4317` and `prometheus` on port 8889. The `traces` pipeline connects the OTLP receiver to the Tempo exporter; the `metrics` pipeline connects the OTLP receiver to the Prometheus exporter.",{"title":58,"body":59},"Configure Grafana Tempo (`tempo-config.yaml`)","Enable the OTLP receiver (gRPC on port 4317). Set the storage backend to `local` mode with path `\u002Fvar\u002Ftempo`. Enable the `search` feature to allow TraceQL queries from Grafana. For production use, replace the `local` backend with `s3` or `gcs` and supply your object storage credentials.",{"title":61,"body":62},"Launch Grafana with Tempo and Prometheus datasources","Mount a provisioning file `datasources.yaml` in the `\u002Fetc\u002Fgrafana\u002Fprovisioning\u002Fdatasources\u002F` folder. Declare two datasources: a `Tempo` one pointing to `http:\u002F\u002Ftempo:3200` and a `Prometheus` one to `http:\u002F\u002Fprometheus:9090`. Start everything with `docker compose up -d`. Open Grafana on port 3000 and verify that both datasources show green.",{"title":64,"body":65},"Instrument a first Node.js or Python application","For Node.js, install `@opentelemetry\u002Fsdk-node` and `@opentelemetry\u002Fauto-instrumentations-node`. Initialise the SDK with the OTLP exporter pointing to `http:\u002F\u002Fyour-vps:4318` and set the `OTEL_SERVICE_NAME` environment variable to your service name. For Python, use `opentelemetry-distro` and `opentelemetry-exporter-otlp`. Restart your application and open Grafana Explore to see your first traces appear.",{"type":67,"body":68},"tip","TraceQL is Grafana Tempo's native query language. It lets you filter traces by duration, service, HTTP status or custom attribute. For example, the query `{ duration > 500ms && status = error }` immediately isolates slow, failing calls across your entire infrastructure. Combine multiple conditions with `&&` or `||` to refine a diagnosis without scrolling through thousands of spans manually.",{"type":32,"title":70,"body":71},"Going further: correlating traces, metrics and logs","Add Grafana Loki to your stack to centralise application logs in the same environment. Grafana Explore lets you jump from a trace to its associated logs in one click, then check the corresponding Prometheus metrics over the same time window. If you prefer a single all-in-one binary, OpenObserve is a lightweight alternative that bundles traces, metrics and logs in a single service — also available as a self-hosted option on VPS.","Grafana est dans le catalogue ServOrbit","Déployez Grafana en un clic depuis notre Marketplace et connectez-y votre stack OTel + Tempo sans configuration manuelle.","Déployer Grafana sur VPS","\u002Fmarketplace\u002Fmonitoring\u002Fgrafana",[],1785852598664]