{"record":{"id":"867e718e5b64d574","repo":"dagger/dagger","slug":"re-export-logs-w","errorCode":null,"errorMessage":"re-export logs: %w","messagePattern":"re-export logs: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"engine/client/client.go","lineNumber":1008,"sourceCode":"\t// NB: we never actually want to interrupt this, since it's relied upon for\n\t// seeing what's going on, even during shutdown\n\tctx = context.WithoutCancel(ctx)\n\n\texp := &otlpConsumer{\n\t\tpath:       \"/v1/logs\",\n\t\ttraceID:    trace.SpanContextFromContext(ctx).TraceID(),\n\t\tclientID:   c.ID,\n\t\thttpClient: httpClient,\n\t\teg:         c.telemetry,\n\t}\n\n\treturn exp.Consume(ctx, func(data []byte) error {\n\t\tvar req collogspb.ExportLogsServiceRequest\n\t\tif err := protojson.Unmarshal(data, &req); err != nil {\n\t\t\treturn fmt.Errorf(\"unmarshal spans: %w\", err)\n\t\t}\n\t\tif err := telemetry.ReexportLogsFromPB(ctx, c.EngineLogs, &req); err != nil {\n\t\t\treturn fmt.Errorf(\"re-export logs: %w\", err)\n\t\t}\n\t\treturn nil\n\t})\n}\n\nfunc (c *Client) exportMetrics(ctx context.Context, httpClient *httpClient) error {\n\t// NB: we never actually want to interrupt this, since it's relied upon for\n\t// seeing what's going on, even during shutdown\n\tctx = context.WithoutCancel(ctx)\n\n\texp := &otlpConsumer{\n\t\tpath:       \"/v1/metrics\",\n\t\ttraceID:    trace.SpanContextFromContext(ctx).TraceID(),\n\t\tclientID:   c.ID,\n\t\thttpClient: httpClient,\n\t\teg:         c.telemetry,\n\t}\n","sourceCodeStart":990,"sourceCodeEnd":1026,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/engine/client/client.go#L990-L1026","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"for _, k := range []string{\"OTEL_EXPORTER_OTLP_ENDPOINT\", \"OTEL_EXPORTER_OTLP_LOGS_ENDPOINT\"} {\n    if v := os.Getenv(k); v != \"\" {\n        if u, err := url.Parse(v); err != nil || u.Host == \"\" {\n            fmt.Printf(\"invalid OTLP endpoint %s=%q\\n\", k, v)\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := run(ctx); err != nil {\n    var reerr *fmt.WrapError // inspect wrapped chain\n    if strings.Contains(err.Error(), \"re-export logs\") {\n        // non-fatal: log and continue; check OTEL collector health\n        slog.Warn(\"log re-export failed\", \"cause\", errors.Unwrap(err))\n    }\n}","preventionTips":["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"],"tags":["telemetry","otel","logs","export"],"backgroundTag":"otel-exporter-failure","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}