docker run -p 4317:4317 -p 4318:4318 ghcr.io/vyuvaraj/servtrace:latestServTrace is the centralized distributed tracing collector and visualizer backend for the Serv ecosystem. It implements OTLP/HTTP trace ingestion, allowing it to collect traces from all services and reconstruct trace waterfalls.
- OTLP/HTTP Ingestion: Standard
/v1/tracesingestion endpoint. - Trace Reassembly: Groups spans by trace ID, links parent-child relationships, and calculates absolute/relative duration offsets.
- REST APIs: Query trace summaries and waterfall hierarchy trees.
- Eviction Policy: Thread-safe in-memory store with oldest-first trace eviction limits.
To run the collector on port 8090:
go run main.go --port 8090 --limit 1000POST /v1/traces- Ingest OTLP/HTTP spansGET /api/traces- List trace summariesGET /api/traces/{traceId}- Fetch trace waterfall treeDELETE /api/traces- Clear all traces in memory
ServTrace can be run as a lightweight, zero-dependency alternative to Jaeger or Zipkin for local development. Since it implements the open standard OTLP/HTTP protocol, you can route traces from any application using official OpenTelemetry SDKs directly to ServTrace.
Configure your application's OpenTelemetry tracer provider to export spans to the ServTrace receiver endpoint:
import (
"context"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
"go.opentelemetry.io/otel/sdk/trace"
)
exporter, err := otlptracehttp.New(ctx,
otlptracehttp.WithEndpoint("localhost:8090"), // Port ServTrace is running on
otlptracehttp.WithInsecure(),
)from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
exporter = OTLPSpanExporter(
endpoint="http://localhost:8090/v1/traces"
)import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
const exporter = new OTLPTraceExporter({
url: 'http://localhost:8090/v1/traces',
});Once your application exports traces, you can inspect them via the HTTP API:
- Reassembled trace summaries:
curl http://localhost:8090/api/traces - Full trace waterfall details:
curl http://localhost:8090/api/traces/<trace-id>
Unlike running full Jaeger infrastructure (which requires Elasticsearch/Cassandra backends and multiple collector/query binaries), ServTrace compiles down to a single binary with zero external dependencies, making it the perfect lightweight Jaeger replacement for local development, testing pipelines, and resource-constrained environments.