You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "zeroshade (via GitHub)" <gi...@apache.org> on 2023/06/09 15:33:44 UTC

[GitHub] [arrow-adbc] zeroshade commented on issue #492: go/adbc/driver/flightsql: add extra logging

zeroshade commented on issue #492:
URL: https://github.com/apache/arrow-adbc/issues/492#issuecomment-1584777969

   So the base Arrow client flight library has [a function](https://pkg.go.dev/github.com/apache/arrow/go/v12/arrow/flight#CreateClientMiddleware) that can be used to easily construct interceptors from simple interfaces to grab the headers. It's pretty easy to create a middleware to perform logging using these interfaces. 
   
   As far as logging in Go, for most cases the standard logging package is more than good enough. But if you want more structured logging [zap](https://pkg.go.dev/go.uber.org/zap), [zerolog](https://pkg.go.dev/github.com/rs/zerolog), and [apex](https://pkg.go.dev/github.com/apex/log) are the most popular structured logging libraries currently. 
   
   For something like ADBC, I'd say we're probably best off setting up a logging interface to allow users to plug whatever logger they want (i.e. follow the stdlib logger's interface because most logging libraries support that interface for compatibility).
   
   For OpenTelemetry, we definitely need to add otel instrumentation to the base arrow flight and flightsql packages, it's not hard. The package is very good and we already pass the context around which would contain the necessary headers etc. It's on my list of things to do, but I'd highly welcome and review any PRs for it!


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org