{"record":{"id":"bdcf90047e7accbc","repo":"weaviate/weaviate","slug":"failed-to-shutdown-trace-provider-w","errorCode":null,"errorMessage":"failed to shutdown trace provider: %w","messagePattern":"failed to shutdown trace provider: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"usecases/telemetry/opentelemetry/provider.go","lineNumber":155,"sourceCode":"func (p *Provider) Tracer() trace.Tracer {\n\tif p.tracer == nil {\n\t\treturn noop.NewTracerProvider().Tracer(\"noop\")\n\t}\n\treturn p.tracer\n}\n\n// Shutdown gracefully shuts down the provider\nfunc (p *Provider) Shutdown(ctx context.Context) error {\n\tif p.provider == nil {\n\t\treturn nil\n\t}\n\n\t// Set a timeout for shutdown\n\tshutdownCtx, cancel := context.WithTimeout(ctx, 30*time.Second)\n\tdefer cancel()\n\n\tif err := p.provider.Shutdown(shutdownCtx); err != nil {\n\t\treturn fmt.Errorf(\"failed to shutdown trace provider: %w\", err)\n\t}\n\n\tp.logger.Info(\"OpenTelemetry provider shutdown successfully\")\n\treturn nil\n}\n\n// IsEnabled returns whether OpenTelemetry is enabled\nfunc (p *Provider) IsEnabled() bool {\n\treturn p.config != nil && p.config.Enabled\n}\n","sourceCodeStart":137,"sourceCodeEnd":166,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/usecases/telemetry/opentelemetry/provider.go#L137-L166","documentation":"Provider.Shutdown failed while flushing and shutting down the SDK TracerProvider within a 30s timeout. Typically means the OTLP collector was unreachable so buffered spans could not be exported, or shutdown exceeded the deadline. Raised during server shutdown; the node is already stopping.","triggerScenarios":"Thrown at usecases/telemetry/opentelemetry/provider.go:155 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Log and continue shutdown: tracing data may be lost but the node must still exit","Ensure the OTLP collector is reachable and fast enough to drain the span buffer","Increase the shutdown timeout or reduce batch size if flushes routinely time out"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}