Railway

Deploy OpenTelemetry Collector

Deploy and Host an OpenTelemetry Collector node

Deploy OpenTelemetry Collector

OpenTelemetry Collector

jratienza65/otel-lgtm-railway

Just deployed

Deploy and Host OpenTelemetry Collector on Railway

The OpenTelemetry (OTel) Collector is a vendor-agnostic way to receive, process, and export telemetry data. It acts as a central proxy for your observability pipeline, allowing you to shift the burden of data delivery away from your applications. By using a standalone collector, you can aggregate logs, metrics, and traces from multiple sources and reliably send them to an external OTLP-compatible backend.

About Hosting the OpenTelemetry Collector

Hosting a standalone OpenTelemetry Collector on Railway allows you to create a high-performance telemetry gateway with zero infrastructure overhead. This template deploys the collector pre-configured with an external OTLP HTTP exporter, enabling you to route data from your Railway services (or external apps) to any third-party observability platform or a remote LGTM stack.

Railway simplifies the deployment by managing service discovery and environment variables. Once deployed, your collector provides a stable internal endpoint for your other services, ensuring that telemetry data is buffered and retried even if your downstream provider experiences downtime.


Common Use Cases

  • Telemetry Aggregation: Collect data from multiple microservices and export it to a single external provider.
  • Protocol Translation: Receive data in various formats (OTLP, Jaeger, Zipkin) and normalize it before exporting.
  • Data Transformation: Mask sensitive information or add infrastructure-level attributes (like railway.service.id) to your spans and logs.
  • Offloading Workload: Reduce application overhead by moving heavy compression and batching logic to the collector.

Dependencies for OpenTelemetry Collector Hosting

  • OpenTelemetry Collector Contrib: The core binary responsible for data processing.
  • OTLP HTTP Exporter: The primary component for shipping data to external backends.

Deployment Dependencies

Implementation Details

This deployment utilizes Railway's private networking to receive data securely from your other services. It is configured to export data to an external OTLP/HTTP endpoint defined in your environment variables.

Internal Ingestion Endpoints (for your apps):

  • OTLP gRPC: http://${{RAILWAY_PRIVATE_DOMAIN}}:4317
  • OTLP HTTP: http://${{RAILWAY_PRIVATE_DOMAIN}}:4318

Required Configuration: To connect to your external provider, ensure the following variables are set:

VariableDescription
RAILWAY_OTEL_EXPORTER_OTLP_ENDPOINTThe full URL of your external OTLP receiver (e.g., https://otlp.example.com).
RAILWAY_OTEL_EXPORTER_OTLP_IS_INSECURESet to true if your external endpoint does not use TLS (rare for production).
RAILWAY_LOKI_ENDPOINT The full URL of your Loki receiver.
RAILWAY_TEMPO_ENDPOINT The full URL of your Tempo receiver.
RAILWAY_PROMETHEUS_ENDPOINT The full URL of your Prometheus receiver.
VERSIONThe specific OTel Collector image tag.

Why Deploy OpenTelemetry LGTM on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying OpenTelemetry Collector on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

OpenTelemetry Collector

jratienza65/otel-lgtm-railway

More templates in this category

View Template
NEW
SigOnly
Deploy SigNoz with a working demo app & config in one click

zoeyjones
View Template
OpenTelemetry Collector and Backend
OpenTelemetry Collector with Backend Stack

Melissa
View Template
pgweb | Postgres UI
View and query your Postgres instance with a sleek and minimalistic UI.

Cory "GH5T" James