OpenTelemetry (OTLP) Overview
StatusRadar provides native OpenTelemetry Protocol (OTLP) support for collecting traces, logs, and metrics from your backend applications.
What is OpenTelemetry?
OpenTelemetry is an open-source observability framework for:
- Traces: Distributed request tracing across services
- Logs: Structured application logging
- Metrics: Custom application and business metrics
Why OTLP?
Vendor-Neutral Standard
- Industry-standard protocol (CNCF project)
- No vendor lock-in
- Extensive language support (Java, Python, Go, Node.js, PHP, Ruby, .NET, etc.)
Unified Observability
- Single SDK for traces, logs, and metrics
- Automatic instrumentation for popular frameworks
- Consistent context across signals
Rich Ecosystem
- Official SDKs from OpenTelemetry
- Auto-instrumentation for frameworks (Express, Django, Gin, Laravel)
- Thousands of community integrations
How It Works
Your App β OTLP SDK β StatusRadar Platform β Dashboard & Alerts
Flow:
- Your Application: Instrumented with OpenTelemetry SDK
- OTLP SDK: Collects traces, logs, and metrics
- StatusRadar Platform: Receives and processes telemetry data
- Dashboard: Visualize traces, query logs, analyze metrics
Supported Signals
1. Traces
Track requests across distributed services:
from opentelemetry import trace
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span("process_payment"):
# Your code here
result = charge_card(amount)
Use cases:
- Request flow visualization
- Performance bottleneck identification
- Error tracking across services
- Dependency mapping
2. Logs
Structured application logging:
import { logs } from '@opentelemetry/api-logs';
logger.emit({
severityText: 'INFO',
body: 'Payment processed',
attributes: {
user_id: '12345',
amount: 49.99,
currency: 'USD'
}
});
Use cases:
- Centralized log aggregation
- Structured search and filtering
- Trace-log correlation
- Audit trails
3. Metrics
Custom application metrics:
import "go.opentelemetry.io/otel/metric"
meter := otel.Meter("my-service")
counter := meter.Int64Counter("requests_total")
counter.Add(ctx, 1, metric.WithAttributes(
attribute.String("method", "POST"),
attribute.String("endpoint", "/api/users"),
))
Use cases:
- Business KPIs tracking
- Application performance metrics
- Custom dashboards
- SLO monitoring
Endpoints
HTTP (Recommended)
https://otlp.statusradar.dev/v1/traces
https://otlp.statusradar.dev/v1/logs
https://otlp.statusradar.dev/v1/metrics
Authentication
Include API token in header:
curl -X POST https://otlp.statusradar.dev/v1/traces \
-H "X-App-Token: your-api-key-here" \
-H "Content-Type: application/json" \
-d @trace.json
Quick Start
1. Create OTLP App
- Dashboard β Observability β Apps
- Click "Create App"
- Select "Backend (OTLP)"
- Copy your API Token
2. Install OpenTelemetry SDK
Refer to the official OpenTelemetry Language Instrumentation guides for installation instructions for your language:
3. Configure SDK for StatusRadar
Node.js
const { NodeSDK } = require('@opentelemetry/sdk-node');
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http');
const { Resource } = require('@opentelemetry/resources');
const sdk = new NodeSDK({
resource: new Resource({
'service.name': 'my-service',
'app.id': 'your-app-id'
}),
traceExporter: new OTLPTraceExporter({
url: 'https://otlp.statusradar.dev/v1/traces',
headers: {
'X-App-Token': 'your-api-key'
}
})
});
sdk.start();
Python
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
trace.set_tracer_provider(TracerProvider(
resource=Resource.create({
"service.name": "my-service",
"app.id": "your-app-id"
})
))
otlp_exporter = OTLPSpanExporter(
endpoint="https://otlp.statusradar.dev/v1/traces",
headers={"X-App-Token": "your-api-key"}
)
trace.get_tracer_provider().add_span_processor(
BatchSpanProcessor(otlp_exporter)
)
4. Verify Data
- Dashboard β Observability β Apps β [Your App]
- Check "Traces", "Logs", or "Metrics" tabs
- Data should appear within seconds
Auto-Instrumentation
Node.js (Express, Fastify, etc.)
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
const sdk = new NodeSDK({
instrumentations: [getNodeAutoInstrumentations()]
});
Automatically instruments:
- HTTP/HTTPS requests
- Express, Fastify, Koa
- MongoDB, MySQL, PostgreSQL
- Redis, Memcached
- AWS SDK
- And 50+ more libraries
Python (Django, Flask, etc.)
After installing OpenTelemetry instrumentation packages, run your application with auto-instrumentation:
opentelemetry-instrument python app.py
See the Python instrumentation guide for package installation instructions.
Go
import (
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
)
// Wrap HTTP handler
handler = otelhttp.NewHandler(handler, "my-server")
// Wrap gRPC client
conn, _ := grpc.Dial(addr,
grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor()),
)
Features
Context Propagation
Automatically propagate trace context across services:
- W3C Trace Context (recommended)
- B3 (Zipkin)
- Jaeger
Sampling
Control data volume:
- Always on
- Probability-based
- Parent-based
- Rate limiting
Resource Attributes
Metadata attached to all telemetry:
- Service name, version, environment
- Host, container, pod info
- Custom business context
Security
- PII sanitization (credit cards, tokens, passwords)
- Field-level redaction
- Sensitive header filtering
Quotas & Pricing
Each plan includes monthly quotas:
- Spans: Number of trace spans (default: 100,000/month)
- Logs: Log storage in MB (default: 1GB/month)
- Metrics: Data points stored (default: unlimited with retention limits)
Top-ups available for overage.
Use Cases
Microservices
- Trace requests across 10+ services
- Identify slow service calls
- Visualize service dependencies
API Monitoring
- Track endpoint performance
- Monitor error rates
- Alert on SLO violations
Database Performance
- Measure query execution time
- Identify N+1 queries
- Monitor connection pool usage
Business Metrics
- Track user signups
- Monitor revenue metrics
- Alert on conversion drops
Comparison with RUM
| OTLP (Backend) | RUM (Frontend) | |
|---|---|---|
| Use case | Server-side apps | Browser apps |
| Signals | Traces, logs, metrics | Page views, vitals, errors |
| Language | Any (Python, Go, Java, etc.) | JavaScript |
| Protocol | OpenTelemetry | Custom RUM SDK |
| Auto-instrumentation | Yes (frameworks, DB, HTTP) | Yes (vitals, errors, clicks) |
Next Steps
- Traces - Distributed tracing setup
- Logs - Structured logging
- Metrics - Custom metrics
- SDKs - Language-specific guides
- Troubleshooting - Common issues
Useful Links
- What is OpenTelemetry?
- Why OTLP?
- Vendor-Neutral Standard
- Unified Observability
- Rich Ecosystem
- How It Works
- Supported Signals
- 1. Traces
- 2. Logs
- 3. Metrics
- Endpoints
- HTTP (Recommended)
- Authentication
- Quick Start
- 1. Create OTLP App
- 2. Install OpenTelemetry SDK
- 3. Configure SDK for StatusRadar
- 4. Verify Data
- Auto-Instrumentation
- Node.js (Express, Fastify, etc.)
- Python (Django, Flask, etc.)
- Go
- Features
- Context Propagation
- Sampling
- Resource Attributes
- Security
- Quotas & Pricing
- Use Cases
- Microservices
- API Monitoring
- Database Performance
- Business Metrics
- Comparison with RUM
- Next Steps
- Useful Links