Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add end-user logging and tracing for drivers #2210

Open
birschick-bq opened this issue Oct 1, 2024 · 5 comments
Open

Add end-user logging and tracing for drivers #2210

birschick-bq opened this issue Oct 1, 2024 · 5 comments
Labels
Type: enhancement New feature or request

Comments

@birschick-bq
Copy link
Contributor

birschick-bq commented Oct 1, 2024

What feature or improvement would you like to see?

I'd like to suggest the following plan based on the use of OpenTelemetry

Create a proof-of-concept

  1. Target a Go driver like Snowflake
  2. Enable the "zero code" automatic instrumentation option

Enable output to

  1. Local file logging
  2. Console logging
  3. Possibly to a remote tracing system

Determine if

  1. automatic instrumentation is a viable option
  2. if automatic instrumentation is too verbose, exposes private, or personally identifying information.
  3. or if we need to use complete manual instrumentation or some combination
  4. determine if cross-runtime contexts can be bridged and if so, how best to accomplish that.
@birschick-bq birschick-bq added the Type: enhancement New feature or request label Oct 1, 2024
@lidavidm
Copy link
Member

lidavidm commented Oct 6, 2024

I'd also be curious if you have ideas about how to bridge OpenTelemetry across runtimes; presumably C#/Python would like to be able to start a span that will properly be the parent span of anything the Go driver does. Possibly we can even do this mostly automatically inside the Go bridge code

@zeroshade
Copy link
Member

The easiest way to bridge OpenTelemetry across the runtimes would be to pass metadata containing the headers to identify the context/span. Since they would be key/value pairs. I've done it with C++/Go before, perhaps through options on the connection/statement

@lidavidm
Copy link
Member

lidavidm commented Oct 6, 2024

Yeah - we would need some manual code (possibly, we can do this automatically in the Python driver manager too when OpenTelemetry is installed) and would just extract/inject the context across the FFI boundary.

@lidavidm
Copy link
Member

lidavidm commented Oct 6, 2024

If there's a better way though...

@birschick-bq
Copy link
Contributor Author

I'd also be curious if you have ideas about how to bridge OpenTelemetry across runtimes; presumably C#/Python would like to be able to start a span that will properly be the parent span of anything the Go driver does. Possibly we can even do this mostly automatically inside the Go bridge code

I've added this to the list of goals for the POC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants