Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

incident.io 5 min read How-to mediumAdept

Logs and tracing: not just for production, local development too

A small team wired its Go app to Google Cloud Trace via the OpenCensus Stackdriver exporter, then teed zap logs to both STDERR and Cloud Logging with trace and span IDs attached, so logs appear inline with traces. The same setup runs in local development: every log line carries a clickable Cloud Trace URL, letting developers jump from one interleaved log line to the full trace of a concurrent request or Pub/Sub handler. The payoff is faster local debugging plus fluency with the production tooling, for a small investment that avoids running any tracing infrastructure.

Related posts

  • Observability as a superpower

    incident.io mediumAdept

    Distributed tracing with OpenTelemetry lets incident.io engineers spot bugs before customers report them, by showing each request's route as a tree of timed spans that exposes slow steps, N+1 queries and duplicate calls. The team gets spans for free from instrumented database and HTTP clients, follows a consistent span naming convention, and tags spans with metadata such as table names, row counts, query fingerprints and org IDs. In Go, an internal library plus a defer-with-named-return pattern records errors on spans automatically. Traces go to Cloud Trace locally and to Grafana Tempo in production, where TraceQL queries power debugging. Trace URLs are threaded into logs, Sentry errors and response headers, with a caution that span and attribute volume drives storage cost.

  • Zero-config Debugging with Deno and OpenTelemetry

    Deno mediumAdept

    Deno's built-in OpenTelemetry support (enabled with --unstable-otel) automatically correlates console.log output with trace IDs, creates spans for incoming and outgoing HTTP requests, propagates W3C tracecontext headers across services, and records request-count and latency metrics by status code, all without code changes. The walkthrough shows why interleaved logs need request correlation and how spans and parent span IDs build a trace. It provides a withSpan helper around startActiveSpan for adding custom spans such as database calls, and contrasts automatic propagation with manually injecting traceparent headers.

  • Logs, Metrics, and Traces: What Does Each Signal Tell You?

    Railway easyNovice

    Logs, metrics and traces answer different questions: metrics show when behaviour changed, traces show where in the service graph a request slowed or failed, and logs explain why. A worked checkout incident follows a p99 latency alert to a slow fraud-check span and then to logs filtered by trace_id, which is why structured JSON logs should carry trace_id/span_id and services should propagate the W3C traceparent header. On Railway, logs and infrastructure metrics are collected natively, while traces need OpenTelemetry exported to a third-party backend.

  • Logging, Metrics, and Distributed Tracing in .NET with OpenTelemetry and ClickStack

    ClickHouse mediumAdept

    Two ASP.NET services (an Order API and a Payment Service backed by SQLite via EF Core) are instrumented with OpenTelemetry and export traces, logs and metrics over OTLP/gRPC to ClickStack, a ClickHouse-based observability stack run in Docker Compose. The setup uses ASP.NET Core, HttpClient and EF Core auto-instrumentation plus custom ActivitySource spans and Meter counters and histograms. W3C traceparent headers propagate context across services so a single trace shows HTTP and database spans on both sides. A deliberate 3-second client timeout against a slow payment path demonstrates how trace waterfalls, log-to-trace correlation and log pattern clustering pinpoint cross-service failures.

  • Connect client traces to your logs

    Supabase mediumAdept

    supabase-js can now propagate W3C Trace Context (traceparent, tracestate, baggage headers) to Supabase, so a client trace_id is stamped onto API Gateway and Edge Function logs and can be joined with browser spans in OpenTelemetry, Sentry, Datadog and similar tools, including via Log Drains. Setup requires your own registered TracerProvider, a separate `@supabase/supabase-js/tracing` import (keeping OpenTelemetry out of the main bundle), `tracePropagation: true`, and an active span; `respectSamplingDecision: false` forces headers for unsampled traces. Headers go only to Supabase domains, there is no CDN/UMD support, and users on 2.106.0–2.111.x must upgrade to 2.112.0+ because bundled apps silently sent no headers.

The quest for software engineering knowledge.

Look:
Layout: