birschick-bq commented on code in PR #2729:
URL: https://github.com/apache/arrow-adbc/pull/2729#discussion_r2072327051


##########
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 
   
   This would require a change to `adbc.Driver.NewDatabase` and 
`adbc.Database.Close` which would have big ripple effect on all the 
implementation and calls.
   
   Are you okay with me making that change?



-- 
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

Reply via email to