Grafana OpenTelemetry Stack

One-click Grafana/OTLP stack deployment

Deploy Grafana OpenTelemetry Stack

Grafana

ginkgoo-ai/do-opentelemetry-collector

Just deployed

/var/lib/grafana

Prometheus

ginkgoo-ai/do-opentelemetry-collector

Just deployed

/prometheus

Loki

ginkgoo-ai/do-opentelemetry-collector

Just deployed

/tmp/loki

Tempo

ginkgoo-ai/do-opentelemetry-collector

Just deployed

/var/tempo

Otel-Collector

ginkgoo-ai/do-opentelemetry-collector

Just deployed

Deploy and Host Grafana-OpenTelemetry Stack on Railway

The Grafana-OpenTelemetry Stack is a pre-configured collection of Grafana, OpenTelemetry Collector, and essential data sources (Tempo/Prometheus/Loki) for one-click deployment. This OTLP-based technology stack provides simple, direct access to application-layer telemetry data, enabling comprehensive observability with minimal setup.

About Hosting Grafana-OpenTelemetry Stack

Hosting this stack involves deploying a unified observability solution that integrates Grafana's visualization capabilities with OpenTelemetry's data collection. The stack includes Tempo for traces, Prometheus for metrics, and Loki for logs - all connected through the OpenTelemetry Collector. Once deployed, applications can be configured to send telemetry data to the collector endpoint, which processes and routes information to the appropriate backends. Railway manages the infrastructure complexity while providing automatic scaling and secure private networking between services.

Common Use Cases

  • Centralized observability for distributed systems
  • End-to-end tracing and performance monitoring
  • Unified metrics, logs, and traces correlation
  • Rapid prototyping of observability stacks

Dependencies for Grafana-OpenTelemetry Stack Hosting

  • Applications instrumented with OpenTelemetry SDKs

Deployment Dependencies

Implementation Details

Configure these OTEL_* environment variables as Shared Variables in Railway:

OTEL_TRACES_EXPORTER="otlp"
OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"

Then set these variables in your application services:

OTEL_EXPORTER_OTLP_ENDPOINT="http://${{Otel-Collector.RAILWAY_PRIVATE_DOMAIN}}:4318"
OTEL_EXPORTER_OTLP_PROTOCOL="${{shared.OTEL_EXPORTER_OTLP_PROTOCOL}}"
OTEL_TRACES_EXPORTER="${{shared.OTEL_TRACES_EXPORTER}}"
OTEL_SERVICE_NAME="${{RAILWAY_SERVICE_NAME}}"
OTEL_RESOURCE_ATTRIBUTES="service.namespace=${{RAILWAY_PROJECT_NAME}},deployment.environment=${{RAILWAY_ENVIRONMENT_NAME}}"

Example of Java service Dockerfile:

FROM maven:3.9-amazoncorretto-23 AS builder
ARG GITHUB_USER
ARG GITHUB_TOKEN

WORKDIR /app
COPY pom.xml ./
COPY settings.xml ./
COPY src ./src

RUN mvn clean install -U -s settings.xml && \
    mvn package -Dmaven.test.skip=true -s settings.xml

FROM openjdk:23-jdk-slim
ARG GRAFANA_OTEL_VERSION=v2.15.0
ENV GRAFANA_OTEL_JAR=grafana-opentelemetry-java-${GRAFANA_OTEL_VERSION}.jar

WORKDIR /app
COPY --from=builder /app/target/*.jar app.jar

# Install curl, download the agent and clean up
RUN apt-get update && \
    apt-get install -y curl && \
    curl -s -L https://github.com/grafana/grafana-opentelemetry-java/releases/download/${GRAFANA_OTEL_VERSION}/grafana-opentelemetry-java.jar \
     -o ${GRAFANA_OTEL_JAR} && \
    apt-get purge -y --auto-remove curl && \
    rm -rf /var/lib/apt/lists/*

CMD ["sh", "-c", "java -Xms128m -Xmx1024m -javaagent:${GRAFANA_OTEL_JAR} -jar app.jar"]

Why Deploy Grafana-OpenTelemetry Stack 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 Grafana-OpenTelemetry Stack 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

More templates in this category

View Template
OpenTelemetry Collector and Backend
OpenTelemetry Collector with Backend Stack

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

View Template
Elasticsearch-Kibana
Elasticsearch is a search engine based on the Lucene library.