One-line OpenTelemetry tracing with deploy-to-deploy SQL regression detection
Add `tracing: { enabled: true }` in `gregale.yaml` for zero-code Node and Python OpenTelemetry spans, in-instance OTLP receivers for Go/containers, normalized SQL queries, PII log redaction and automatic deploy-to-deploy `failure_regression` alerts.
Turn on tracing: { enabled: true } in gregale.yaml to get zero-code OpenTelemetry request tracing with automatic deploy-to-deploy SQL latency and failure-regression detection—without configuring API keys, exporters, or PII scrubbing.
Why small teams skip distributed tracing
Setting up observability on a new backend usually means picking an external APM vendor, managing ingestion keys, installing language-specific SDKs, wiring traceparent forwarding, and making sure raw SQL parameters or customer emails never leak into spans. Most small teams postpone it until a slow deploy already hurts users.
One-line OpenTelemetry across Node, Python, Go, and containers
Enable request tracing in gregale.yaml (or [tracing] enabled = true in gregale.toml):
tracing:
enabled: true
On the next deployment, Gregale instruments supported runtimes automatically:
- Managed Node.js (
22,24): Auto-instruments Express, Fastify, Koa, NestJS, HTTP servers/clients,pg, MySQL, MongoDB, Redis, and gRPC via@opentelemetry/auto-instrumentations-node, and linkspino/bunyanrequest logs automatically. - Managed Python (
3.12,3.13): Auto-instruments Django, Flask, FastAPI, WSGI/ASGI,psycopg,psycopg2,asyncpg, SQLAlchemy, Redis, PyMongo, andrequests/urllib3/httpx/aiohttp, linking standardloggingrecords automatically. - Go and custom containers: Compiled Go apps can import
github.com/gregale-dev/gregale-go/preview/tracing(tracing.Handler,tracing.Transport,tracing.Open), while Dockerfile/custom images already using OpenTelemetry export straight to the in-instance receiver (http://127.0.0.1:4318/v1/tracesor gRPC127.0.0.1:4317, pre-wired viaOTEL_EXPORTER_OTLP_TRACES_*).
Instrumentation loads before Gregale snapshots your app, so waking from a memory snapshot pays zero extra startup overhead.
Deploy-to-deploy SQL normalization and failure regressions
Every traced request feeds gregale debug requests get and gregale debug trace <trace-id> (also accepting x-faas-request-id), showing wake-vs-app duration splits and cross-service hops (including inferred single-flight links flagged with trace_inferred: true if an instance serving one request omits traceparent):
- Normalized dependency grouping: Literals,
INlists, and multi-rowVALUESfold automatically (WHERE id = 42andWHERE id = 43become one normalized statement, and Redis keeps onlyGET ?rather than cache keys). - Automated regression verdicts: The debugger compares each route against the previous deployment and surfaces exact slowdowns (
SELECT * FROM orders WHERE customer_id = ?p95 40 ms to 210 ms) as well asfailure_regressionalerts when a dependency hits at least 3 failures and jumps >=5 percentage points and 2x over baseline. - Privacy and redaction built in: User IDs, request headers, URL query strings, full SQL values, and stack traces are dropped at ingestion; linked log lines keep only the last 20 lines (512 chars max) with emails, tokens, and card numbers redacted.
Forward to Grafana/Honeycomb/Datadog or store zero-key metrics
Keep Gregale's debugger while also dual-shipping raw unstripped spans, logs, and metrics to your existing observability stack via tracing.forward:
tracing:
enabled: true
forward:
endpoint: https://otlp.example.com
headers_secret: OTLP_HEADERS
metrics: true
tracing.forward buffers up to 4 MiB per instance with three background retries so slow upstream collectors never stall customer requests, while tracing.metrics: true stores OpenTelemetry metrics (delta temporality) straight into Gregale custom metrics with no API key.
Operational limits and when an external APM fits better
- Sampling on hot endpoints: Busy routes keep individual request records (and attached spans) for the first
30traced requests per route, method, and status each minute, plus dedicated error samples (tracing.sample_ratioadjusts trace volume). - Coverage boundaries: Tracing requires a plan with the production debugger (the public
/v1/otel/v1/tracesendpoint returns404when disabled for an account); plainconsole.logandwinstonlogs are not auto-linked, filesystem/DNS calls are not traced, and pre-fork servers likegunicornstill need standard post-fork worker initialization.
See Trace requests, Read logs, Tune scaling, Application companions, and Gregale pricing.
Questions
- Do I need to install an OpenTelemetry exporter or API key to trace requests?
No. Set
tracing: { enabled: true }ingregale.yaml(tracing.enabled = trueingregale.toml) and Gregale auto-instruments managed Node.js (22, 24) and Python (3.12, 3.13) runtimes and provides loopback OTLP receivers (127.0.0.1:4318/4317) for Go and Docker images.- Does Gregale strip customer PII and SQL values from trace spans?
Yes. Gregale folds SQL literals into parameterized patterns (
WHERE customer_id = ?), drops query values, request headers, user IDs and exception stack traces at ingestion, and redacts emails, card numbers and tokens from linked logs.- Can I still send traces to Grafana, Honeycomb or Datadog?
Yes. Set
tracing.forwardwith your OTLP/HTTP endpoint andOTLP_HEADERSsecret to forward complete raw spans, logs and metrics asynchronously via a 4 MiB in-instance buffer alongside the Gregale debugger.