To spin up a temporary container exposing the service locally for testing (where data resets on container exit):
docker run --rm -d \
-p 4318:4318 \
-p 4319:4319 \
--name tracep-test \
chiefj/tracep-go:latest
Because the Go server uses a local SQLite database (traces.db), you must mount a persistent volume so trace data is not lost when the container is updated or restarted.
# 1. Create a local directory for storage
mkdir -p $(pwd)/tracep-data
# 2. Start the container with persistence & configuration
docker run -d \
-p 4318:4318 \
-p 4319:4319 \
-v $(pwd)/tracep-data:/app/data \
-e TRACE_TOKEN="your-secure-auth-token" \
-e RETENTION_HOURS=48 \
--restart unless-stopped \
--name tracep-server \
chiefj/tracep-go:latest
You can customize the container's behavior using the following environment variables (-e KEY=VALUE):
| Variable | Default | Description |
|---|---|---|
TRACE_TOKEN | None | Secure token required in the Authorization: Bearer <token> header. Keep blank to disable authentication. |
RETENTION_HOURS | 48 | Auto-prune interval. Traces/spans older than this duration are automatically purged every 15 minutes. |
DB_PATH | /app/data/traces.db | The internal filepath of the SQLite database. |
INGEST_PORT | 4318 | Port that handles OpenTelemetry (OTLP) ingest. |
QUERY_PORT | 4319 | Port that serves the Query/Dashboard APIs. |
PORT | None | Set this to run in Single-Port Mode (multiplexes both Ingest and Query APIs on the same port, ideal for Render/Cloud Run). |
To monitor the background cleanup task or incoming requests:
docker logs -f tracep-server
Below are the curls configured for a local persistent setup (change ports/host appropriately if running in single-port mode or on Render):
curl -i http://localhost:4319/health
Send a test span payload using the OTLP JSON format:
curl -i -X POST http://localhost:4318/v1/traces \
-H "Content-Type: application/json" \
-d '{
"resourceSpans": [
{
"scopeSpans": [
{
"spans": [
{
"traceId": "4f6df6e5f689072a4f6df6e5f689072a",
"spanId": "4f6df6e5f689072a",
"name": "manual-debug-span",
"startTimeUnixNano": "1687169400000000000",
"endTimeUnixNano": "1687169400500000000"
}
]
}
]
}
]
}'
curl -i http://localhost:4319/traces
curl -i http://localhost:4319/traces/4f6df6e5f689072a4f6df6e5f689072a
curl -i http://localhost:4319/spans/4f6df6e5f689072a
curl -i http://localhost:4319/classes
curl -i http://localhost:4319/functions
Content type
Image
Digest
sha256:064c2e199…
Size
9.3 MB
Last updated
3 months ago
docker pull chiefj/tracep-go