birschick-bq commented on code in PR #2729: URL: https://github.com/apache/arrow-adbc/pull/2729#discussion_r2073861286
########## go/adbc/driver/internal/driverbase/database.go: ########## @@ -136,4 +200,113 @@ func (db *database) SetLogger(logger *slog.Logger) { } } +func (base *database) InitTracing(driverName string, driverVersion string) { + base.Base().InitTracing(driverName, driverVersion) +} + +func (base *DatabaseImplBase) InitTracing(driverName string, driverVersion string) { + var exporter sdktrace.SpanExporter = nil + var tracer trace.Tracer + + exporterName := os.Getenv("OTEL_TRACES_EXPORTER") + exporterType, _ := tryParseTraceExporterType(exporterName) + switch exporterType { + case TraceExporterConsole: + exporter, _ = newStdoutTraceExporter() + case TraceExporterOtlp: + exporter, _ = newOtlpTraceExporter(context.Background()) Review Comment: @zeroshade Okay. Added the `NewDatabaseWithContext` (followed the `NewDatabaseWithOptions` naming pattern). Let me know if this is what you're looking for. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org