andrusha / snowflake-rs

Snowflake API libraries for Rust
Apache License 2.0
31 stars 26 forks source link

Add support for custom middleware (eg. tracing) #14

Closed wseaton closed 9 months ago

wseaton commented 10 months ago

I'm very interested in using this project as an alternative for the gosnowflake API, but one thing I need to get working is tracing support. This attempts to make that possible via feature flag, and it works great testing with local Jaeger and OTLP as the exporter.

Is there a creative way to make this work without forcing users to take opentelemetry_0_21? Or potentially by allowing a SnowflakeApi instance to be created with a fully custom client?

wseaton commented 9 months ago

Sounds good, when I have some time I'll take a pass at that.

wseaton commented 9 months ago

@andrusha I took a crack at a new SnowflakeApiBuilder as a mechanism for exposing the client middleware without breaking the existing SnowflakeApi's API, let me know what you think!

andrusha commented 9 months ago

Could you merge with the main? I've removed nursery linters

wseaton commented 9 months ago

@andrusha done!

wseaton commented 9 months ago

Tests are failing due to doctest in comment, going to mark to be skipped