dagger/dagger · warning
re-export logs: %w
Error message
re-export logs: %w
What it means
This error wraps failures from telemetry.ReexportLogsFromPB, which forwards log records received from the engine's OTLP /v1/logs endpoint to the SDK's EngineLogs exporter. The Dagger engine client consumes JSON-encoded OTLP log export requests and re-exports them into the host-side telemetry pipeline; any failure in that exporter is surfaced with the 're-export logs' prefix.
Source
Thrown at engine/client/client.go:1008
// NB: we never actually want to interrupt this, since it's relied upon for
// seeing what's going on, even during shutdown
ctx = context.WithoutCancel(ctx)
exp := &otlpConsumer{
path: "/v1/logs",
traceID: trace.SpanContextFromContext(ctx).TraceID(),
clientID: c.ID,
httpClient: httpClient,
eg: c.telemetry,
}
return exp.Consume(ctx, func(data []byte) error {
var req collogspb.ExportLogsServiceRequest
if err := protojson.Unmarshal(data, &req); err != nil {
return fmt.Errorf("unmarshal spans: %w", err)
}
if err := telemetry.ReexportLogsFromPB(ctx, c.EngineLogs, &req); err != nil {
return fmt.Errorf("re-export logs: %w", err)
}
return nil
})
}
func (c *Client) exportMetrics(ctx context.Context, httpClient *httpClient) error {
// NB: we never actually want to interrupt this, since it's relied upon for
// seeing what's going on, even during shutdown
ctx = context.WithoutCancel(ctx)
exp := &otlpConsumer{
path: "/v1/metrics",
traceID: trace.SpanContextFromContext(ctx).TraceID(),
clientID: c.ID,
httpClient: httpClient,
eg: c.telemetry,
}
View on GitHub (pinned to 82ba2681db)
Solutions
- Check that the OTLP logs endpoint configured via OTEL_* env vars is reachable and accepting exports
- Inspect the wrapped inner error for the underlying exporter failure (connection refused, 4xx/5xx, auth)
- Retry the session; telemetry export failures are non-fatal to the pipeline itself
- Report with a dagger debug log if the inner error is a conversion/protobuf error
Defensive patterns
Strategy: try-catch
Validate before calling
for _, k := range []string{"OTEL_EXPORTER_OTLP_ENDPOINT", "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT"} {
if v := os.Getenv(k); v != "" {
if u, err := url.Parse(v); err != nil || u.Host == "" {
fmt.Printf("invalid OTLP endpoint %s=%q\n", k, v)
}
}
} Try / catch
if err := run(ctx); err != nil {
var reerr *fmt.WrapError // inspect wrapped chain
if strings.Contains(err.Error(), "re-export logs") {
// non-fatal: log and continue; check OTEL collector health
slog.Warn("log re-export failed", "cause", errors.Unwrap(err))
}
} Prevention
- Ensure the OTLP collector defined by OTEL_* env vars is running before starting dagger sessions
- Validate OTEL_EXPORTER_OTLP_ENDPOINT/OTEL_EXPORTER_OTLP_LOGS_ENDPOINT URLs and auth
- Monitor collector health; treat telemetry export errors as non-fatal
- Keep dagger CLI and engine versions in sync
When it happens
Trigger: The engine pushes a logs export batch over the OTLP HTTP consumer and ReexportLogsFromPB returns an error, typically because the configured EngineLogs exporter (e.g. an OTLP endpoint set via OTEL exporter env vars) rejects or cannot reach its destination, or the log record payload cannot be converted/re-exported.
Common situations: Users with OTEL_* environment variables pointing at a down or misconfigured collector; collector rejecting batches due to auth or payload limits; failures during session teardown when the log pipeline is shutting down.
Related errors
AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05).
Data as JSON: /api/errors/867e718e5b64d574.
Report an issue: GitHub.