Railway
Add Obtrace observability to Railway services with environment variables and the SDK.
Railway
Railway services are instrumented by setting environment variables and adding the Obtrace SDK.
Step 1: Set environment variables
Via Railway CLI
Via Railway dashboard
Go to your service → Variables tab → add:
| Variable | Value |
|---|---|
OBTRACE_API_KEY | obt_live_... |
OBTRACE_PLATFORM | railway |
Step 2: Add the SDK
Node.js
Python
Go
Railway metadata
The SDK auto-detects these Railway environment variables when available:
| Railway Variable | Mapped to |
|---|---|
RAILWAY_SERVICE_NAME | service.name |
RAILWAY_ENVIRONMENT | deployment.environment |
RAILWAY_REPLICA_ID | service.instance.id |
RAILWAY_GIT_COMMIT_SHA | service.version |
RAILWAY_GIT_BRANCH | vcs.branch |
OpenTelemetry native export
Railway apps can also export OTLP directly:
This works with any OpenTelemetry-instrumented application in any language.