Observability Backends
Comprehensive guide to observability backends supported by Mindwave, including setup instructions, configuration examples, and best practices for Jaeger, Grafana Tempo, Honeycomb, Datadog, and other platforms.
Overview
Mindwave supports two types of trace storage:
- Database Storage - Store traces in your application database (MySQL, PostgreSQL, etc.)
- OTLP Export - Send traces to any OTLP-compatible observability platform
You can use both simultaneously for maximum flexibility.
Supported Backends
Database (Eloquent)
Store traces directly in your application database for local querying.
Pros:
- No external dependencies
- Fast local queries with Eloquent
- Complete control over data
- Cost-effective
Cons:
- Limited to single application
- No distributed tracing
- Database growth over time
Setup:
# Publish and run migrations
php artisan vendor:publish --tag=mindwave-migrations
php artisan migrateConfiguration:
MINDWAVE_TRACE_DATABASE=true
MINDWAVE_TRACE_DB_CONNECTION=mysqlQuery traces:
use Mindwave\Mindwave\Observability\Models\Trace;
$traces = Trace::with('spans')
->orderBy('created_at', 'desc')
->limit(10)
->get();Learn more: Querying Traces
Jaeger
Open-source distributed tracing platform originally developed by Uber.
Pros:
- Open source and free
- Excellent trace visualization
- Service dependency graphs
- Active community
Cons:
- Requires infrastructure setup
- Limited long-term storage
- Basic querying capabilities
Quick Start (Docker):
docker run -d --name jaeger \
-p 4317:4317 \
-p 4318:4318 \
-p 16686:16686 \
jaegertracing/all-in-one:latestConfiguration:
MINDWAVE_TRACE_OTLP_ENABLED=true
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobufAccess UI:
Kubernetes Deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: jaeger
spec:
replicas: 1
selector:
matchLabels:
app: jaeger
template:
metadata:
labels:
app: jaeger
spec:
containers:
- name: jaeger
image: jaegertracing/all-in-one:latest
ports:
- containerPort: 4318
- containerPort: 16686Grafana Tempo
High-scale, cost-effective distributed tracing backend from Grafana Labs.
Pros:
- Extremely cost-effective (object storage)
- Scales to petabytes
- Integrates with Grafana dashboards
- Multi-tenant support
Cons:
- Limited querying (no full-text search)
- Requires Grafana for visualization
- TraceQL learning curve
Docker Compose:
version: '3'
services:
tempo:
image: grafana/tempo:latest
command: ['-config.file=/etc/tempo.yaml']
volumes:
- ./tempo.yaml:/etc/tempo.yaml
- ./tempo-data:/tmp/tempo
ports:
- '3200:3200'
- '4317:4317'
- '4318:4318'
grafana:
image: grafana/grafana:latest
volumes:
- ./grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
ports:
- '3000:3000'Tempo Configuration (tempo.yaml):
server:
http_listen_port: 3200
distributor:
receivers:
otlp:
protocols:
http:
grpc:
storage:
trace:
backend: local
local:
path: /tmp/tempo/blocksMindwave Configuration:
MINDWAVE_TRACE_OTLP_ENABLED=true
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318Multi-Tenant:
OTEL_EXPORTER_OTLP_HEADERS=X-Scope-OrgID=tenant-1Honeycomb
Modern observability platform designed for high-cardinality data and powerful querying.
Pros:
- Best-in-class query interface
- Excellent for debugging
- Great visualizations
- Generous free tier
Cons:
- Cost can scale with usage
- Proprietary platform
- Requires account signup
Setup:
- Sign up at https://honeycomb.io
- Get your API key
- Create a dataset
Configuration:
MINDWAVE_TRACE_OTLP_ENABLED=true
OTEL_EXPORTER_OTLP_ENDPOINT=https://api.honeycomb.io:443
OTEL_EXPORTER_OTLP_HEADERS=x-honeycomb-team=YOUR_API_KEY,x-honeycomb-dataset=mindwaveEnvironment-Specific Datasets:
# Development
HONEYCOMB_DATASET=mindwave-dev
# Production
HONEYCOMB_DATASET=mindwave-productionQuery Examples:
# Find expensive operations
AVG(gen_ai.usage.total_tokens) > 1000
# Monitor error rate
COUNT WHERE otel.status_code = "ERROR"Datadog
Full-stack monitoring and analytics platform.
Pros:
- Complete observability suite
- APM, logs, metrics in one place
- Strong alerting and dashboards
- Enterprise support
Cons:
- Expensive at scale
- Complex pricing model
- Learning curve
Via Datadog Agent:
Install and configure the Datadog Agent with OTLP support:
# datadog.yaml
otlp_config:
receiver:
protocols:
http:
endpoint: 0.0.0.0:4318
grpc:
endpoint: 0.0.0.0:4317Mindwave Configuration:
MINDWAVE_TRACE_OTLP_ENABLED=true
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318Via OpenTelemetry Collector:
# otel-collector.yaml
exporters:
datadog:
api:
key: ${DD_API_KEY}
site: datadoghq.com
service:
pipelines:
traces:
receivers: [otlp]
exporters: [datadog]New Relic
Application performance monitoring with distributed tracing.
Pros:
- Comprehensive APM features
- Business analytics integration
- Good documentation
- AI-powered insights
Cons:
- Expensive
- Complex UI
- Vendor lock-in
Configuration:
MINDWAVE_TRACE_OTLP_ENABLED=true
OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.nr-data.net:4318
OTEL_EXPORTER_OTLP_HEADERS=api-key=YOUR_LICENSE_KEYEU Region:
OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.eu01.nr-data.net:4318OpenTelemetry Collector
Vendor-agnostic telemetry pipeline that receives, processes, and exports traces.
Pros:
- Centralized configuration
- Advanced processing
- Multi-backend export
- Buffering and retry logic
Cons:
- Additional infrastructure
- Configuration complexity
- Operational overhead
Basic Configuration:
# otel-collector.yaml
receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318
grpc:
endpoint: 0.0.0.0:4317
processors:
batch:
timeout: 10s
memory_limiter:
check_interval: 1s
limit_mib: 512
exporters:
otlp/jaeger:
endpoint: jaeger:4317
tls:
insecure: true
otlp/tempo:
endpoint: tempo:4317
tls:
insecure: true
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [otlp/jaeger, otlp/tempo]Docker:
docker run -d --name otel-collector \
-p 4317:4317 \
-p 4318:4318 \
-v $(pwd)/otel-collector.yaml:/etc/otel-collector.yaml \
otel/opentelemetry-collector:latest \
--config=/etc/otel-collector.yamlMindwave Configuration:
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318Learn more: OTLP & Exporters
Comparison Matrix
| Feature | Database | Jaeger | Tempo | Honeycomb | Datadog | New Relic |
|---|---|---|---|---|---|---|
| Cost | Free | Free | Low | Medium | High | High |
| Setup Complexity | Easy | Medium | Medium | Easy | Medium | Easy |
| Scalability | Limited | Medium | High | High | High | High |
| Query Power | High | Medium | Low | High | High | High |
| Visualization | None | Good | Good | Excellent | Good | Good |
| Multi-Service | No | Yes | Yes | Yes | Yes | Yes |
| Self-Hosted | Yes | Yes | Yes | No | No | No |
Choosing a Backend
For Startups
Recommended: Database + Honeycomb
- Database for local development
- Honeycomb free tier for production
- Easy to get started
- Scale as you grow
For Small Teams
Recommended: Jaeger + Database
- Self-hosted, no ongoing costs
- Good visualization
- Database for custom queries
- Full control over data
For Medium Companies
Recommended: Grafana Tempo + Grafana
- Cost-effective at scale
- Integrates with existing Grafana
- Object storage keeps costs low
- Open source ecosystem
For Enterprises
Recommended: Datadog or New Relic
- Full observability suite
- Enterprise support
- Advanced analytics
- Compliance features
Multi-Backend Setup
Use multiple backends simultaneously for different purposes:
# Local queries
MINDWAVE_TRACE_DATABASE=true
# Production monitoring
MINDWAVE_TRACE_OTLP_ENABLED=true
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318Benefits:
- Database for fast local debugging
- OTLP for distributed production tracing
- Redundancy and backup
- Flexibility during migrations
Best Practices
1. Start Simple
Begin with database storage, add OTLP later:
# Week 1: Database only
MINDWAVE_TRACE_DATABASE=true
# Week 4: Add Jaeger
MINDWAVE_TRACE_OTLP_ENABLED=true
OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:43182. Use OpenTelemetry Collector in Production
The collector provides:
- Centralized configuration
- Buffering and retry
- Multi-backend export
- Advanced filtering
3. Match Backend to Use Case
- Debugging: Honeycomb or Jaeger
- Cost Optimization: Tempo
- Compliance: Datadog or New Relic
- Open Source: Jaeger or Tempo
4. Plan for Data Retention
Configure retention based on backend:
- Database: Prune regularly
- Jaeger: Limited storage
- Tempo: Long-term object storage
- Honeycomb: Configure per dataset
5. Monitor Your Monitoring
Track collector health:
extensions:
health_check:
endpoint: 0.0.0.0:13133
zpages:
endpoint: 0.0.0.0:55679Troubleshooting
Connection Issues
Test endpoint:
curl -X POST http://localhost:4318/v1/traces \
-H "Content-Type: application/x-protobuf" \
-d ''Check logs:
tail -f storage/logs/laravel.log | grep -i otlpBackend Not Receiving Traces
- Verify endpoint configuration
- Check firewall rules
- Validate authentication headers
- Review backend logs
High Memory Usage
Use sampling to reduce volume:
MINDWAVE_TRACE_SAMPLER=traceidratio
MINDWAVE_TRACE_SAMPLE_RATIO=0.1Related Documentation
- Observability Overview - Introduction
- Configuration - Complete configuration reference
- OTLP & Exporters - Detailed OTLP setup
- Querying - Query traces in different backends