Skip to main content

Ingestion

Batch traces client-side:
const lumina = initLumina({
  endpoint: 'http://lumina:9411/v1/traces',
  service_name: 'high-volume',
  batchSize: 100,
  batchTimeout: 1000,
});
Enable compression:
ENABLE_COMPRESSION=true
Scale horizontally:
kubectl scale deployment lumina-ingestion --replicas=10

Queries

Enable caching:
ENABLE_QUERY_CACHE=true
CACHE_TTL_SECONDS=60
Optimize indexes:
CREATE INDEX CONCURRENTLY idx_traces_service_timestamp
ON traces (service_name, timestamp DESC);

Database

Tune PostgreSQL:
ALTER SYSTEM SET shared_buffers = '4GB';
ALTER SYSTEM SET work_mem = '64MB';
ALTER SYSTEM SET effective_cache_size = '16GB';
SELECT pg_reload_conf();

Sampling

For very high volumes:
const lumina = initLumina({
  endpoint: 'http://lumina:9411/v1/traces',
  service_name: 'ultra-high-volume',
  samplingRate: 0.1,
  alwaysSampleConditions: {
    error: true,
    costUsd: { $gt: 0.5 },
  },
});