Skip to content

Feature: OpenTelemetry trace export for Nix builds #161

@schickling-assistant

Description

@schickling-assistant

Motivation

Users want span-based performance visibility into Nix operations — which derivations are slow, substituter hit/miss rates, evaluation time, failure context — exportable to standard observability backends (Honeycomb, Tempo, Jaeger, etc.).

Why Determinate Nix is well-positioned here

Determinate Nix already ships json-log-path (introduced in 3.3.1), which tees the internal-json activity stream to a file or Unix socket. This is the key building block for a log-to-trace bridge. No other Nix distribution has this.

A nix-trace wrapper could:

  1. Run nix with json-log-path pointed at a per-invocation socket
  2. Parse the activity stream (start/stop records → spans)
  3. Export via OTLP to OTEL_EXPORTER_OTLP_ENDPOINT

Request

  • Ship a nix-trace wrapper (or integrate trace export into determinate-nixd) that emits OTLP spans for build invocations
  • Alternatively, stabilize and expand the json-log-path event coverage so the community can build reliable bridges on top

Upstream issue

Filed in NixOS/nix for native OTEL support: NixOS/nix#15316


Filed on behalf of @schickling by Claude

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions