Sazabi
Data SourcesManual Data Sources

Railway

Forward Railway deployment logs to Sazabi for real-time monitoring.

Forward your Railway deployment logs directly to Sazabi for real-time monitoring of your applications. Track deployments, services, and resource usage with AI-powered analysis.

About this data source

Railway is a platform for deploying applications and databases. By configuring OpenTelemetry in your Railway services, you can:

  • Stream logs from all your Railway deployments
  • Monitor service health and performance
  • Track deployment events and rollbacks
  • Correlate Railway logs with other data sources
  • Use AI to troubleshoot deployment issues

Prerequisites

Before you begin, make sure you have:

  • A Railway account with deployed services
  • Access to set environment variables on your services
  • A Sazabi public API key (project-scoped)

Get your API key

Create a public key

Click Create API key and select Public as the key type. Public keys are scoped to a single project.

Copy the key and store it securely. You will not be able to see it again.

Setup

Add OpenTelemetry to your application

Install the OpenTelemetry SDK for your language:

npm install @opentelemetry/api @opentelemetry/sdk-node @opentelemetry/auto-instrumentations-node @opentelemetry/exporter-logs-otlp-http
pip install opentelemetry-api opentelemetry-sdk opentelemetry-exporter-otlp
go get go.opentelemetry.io/otel
go get go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp

Set environment variables in Railway

Add the following environment variables to your Railway service:

OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.<region>.intake.sazabi.com
OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <your-api-key>"
OTEL_SERVICE_NAME=my-railway-service

Replace <region> with your Sazabi project region (e.g., us-east-1) and <your-api-key> with your Sazabi public API key.

You can set these in the Railway dashboard under your service's Variables tab.

Initialize OpenTelemetry

Initialize OpenTelemetry at the start of your application. The SDK will automatically use the environment variables for configuration.

Deploy your service

Deploy your Railway service with the new configuration. Logs will begin flowing to Sazabi automatically.

Features

  • Real-time log streaming via OpenTelemetry
  • Support for logs, traces, and metrics
  • Service and deployment metadata included automatically
  • Works with any language that has an OpenTelemetry SDK

Verifying logs are flowing

Once configured, verify that logs are flowing to Sazabi:

  1. Generate activity: Make requests to your Railway service or trigger application logs.

  2. Ask the assistant: Open a thread in Sazabi and ask "Show me recent Railway logs" or "What errors occurred in my Railway services today?"

Troubleshooting

Logs not appearing in Sazabi

  • Verify environment variables are set in your Railway service
  • Check that OpenTelemetry is initialized at application startup
  • Ensure the endpoint URL includes the correct region
  • Redeploy your service if you recently added the variables

401 Unauthorized errors

  • Your API key may be invalid or expired
  • Verify the OTEL_EXPORTER_OTLP_HEADERS format
  • Create a new public API key in Settings > API Keys

Service not sending logs

Make sure your application is actually using the OpenTelemetry logger. Check that your logging library is configured to use the OTEL exporter.