{"record":{"id":"a08553afd9a1f22c","repo":"vxcontrol/pentagi","slug":"failed-to-create-tracer-exporter-w","errorCode":null,"errorMessage":"failed to create tracer exporter: %w","messagePattern":"failed to create tracer exporter: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/pkg/observability/otelclient.go","lineNumber":132,"sourceCode":"\t}\n\n\t// Build all three exporters before creating any provider. Exporter creation\n\t// is the only remaining error path, and at that point no batch/reader\n\t// goroutine has started yet, so closing the connection is a complete teardown.\n\tlogExporter, err := otlploggrpc.New(ctx, otlploggrpc.WithGRPCConn(conn))\n\tif err != nil {\n\t\t_ = conn.Close()\n\t\treturn nil, fmt.Errorf(\"failed to create log exporter: %w\", err)\n\t}\n\tmetricExporter, err := otlpmetricgrpc.New(ctx, otlpmetricgrpc.WithGRPCConn(conn))\n\tif err != nil {\n\t\t_ = conn.Close()\n\t\treturn nil, fmt.Errorf(\"failed to create metric exporter: %w\", err)\n\t}\n\tspanExporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithGRPCConn(conn))\n\tif err != nil {\n\t\t_ = conn.Close()\n\t\treturn nil, fmt.Errorf(\"failed to create tracer exporter: %w\", err)\n\t}\n\n\tlogProvider := sdklog.NewLoggerProvider(\n\t\tsdklog.WithProcessor(sdklog.NewBatchProcessor(\n\t\t\tlogExporter,\n\t\t\tsdklog.WithExportInterval(DefaultLogInterval),\n\t\t\tsdklog.WithExportTimeout(DefaultLogTimeout),\n\t\t)),\n\t\tsdklog.WithResource(newResource(resourceAttrs(cfg)...)),\n\t)\n\n\tmeterProvider := sdkmetric.NewMeterProvider(\n\t\tsdkmetric.WithReader(sdkmetric.NewPeriodicReader(\n\t\t\tmetricExporter,\n\t\t\tsdkmetric.WithInterval(DefaultMetricInterval),\n\t\t\tsdkmetric.WithTimeout(DefaultMetricTimeout),\n\t\t)),\n\t\tsdkmetric.WithResource(newResource(resourceAttrs(cfg)...)),","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/observability/otelclient.go#L114-L150","documentation":"Construction of the OTLP gRPC span (tracer) exporter (otlptracegrpc.New) failed during NewTelemetryClient; the shared connection is closed for complete teardown and the error is wrapped with this message.","triggerScenarios":"otlptracegrpc.New returning an error at setup time — invalid options, SDK/version mismatch, or bad credentials configuration. Not a network failure: grpc.NewClient is lazy, so this happens before any dial.","commonSituations":"Dependency upgrade breaking the tracing API surface; adding TLS options with missing/invalid CA certs; corrupted vendor directory.","solutions":["Run `go mod tidy` / `go mod download` and rebuild","Read the wrapped cause for the precise setup failure","Validate certificate paths if TLS options were introduced","Verify the observability stack version matches the OTLP exporter expectations"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// verify tracing module versions: go list -m go.opentelemetry.io/otel/sdk go.opentelemetry.io/otel/exporters/otlp/otlptrace","typeGuard":null,"tryCatchPattern":"client, err := NewTelemetryClient(ctx, cfg)\nif err != nil {\n    log.Warnf(\"tracing disabled due to init failure: %v\", err)\n    client = nil\n}","preventionTips":["Keep otlptracegrpc and sdk versions from the same release train","Validate CA cert files when enabling TLS","Run CI builds after any otel bump","Make telemetry optional at the call site (nil client)"],"tags":["opentelemetry","exporter","tracing","grpc"],"backgroundTag":"exporter-init-failed","analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}