zeroshade commented on code in PR #2729: URL: https://github.com/apache/arrow-adbc/pull/2729#discussion_r2073896421
########## go/adbc/driver/internal/driverbase/database.go: ########## @@ -136,4 +201,218 @@ func (db *database) SetLogger(logger *slog.Logger) { } } +func (base *database) InitTracing(ctx context.Context, driverName string, driverVersion string) error { + return base.Base().InitTracing(ctx, driverName, driverVersion) +} + +func (base *DatabaseImplBase) InitTracing(ctx context.Context, driverName string, driverVersion string) (err error) { + fullyQualifiedDriverName := driverNamespace + "." + driverName + + getExporterName := sync.OnceValue(func() string { + return os.Getenv(otelTracesExporter) + }) Review Comment: this needs to get hoisted out of this function, otherwise you're creating a new `sync.OnceValue` on every call. defeating the purpose. This should be file-level -- 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