Alex

Results 39 comments of Alex

Thanks for the question @eslamodeh and the answer @MyklClason !

@jamiemccarthy - [v6.3](https://github.com/alexrudall/ruby-openai/releases/tag/v6.3.0) allows you to add custom Faraday middleware - see [README](https://github.com/alexrudall/ruby-openai#verbose-logging) - I think this could be used to link to OpenTelemetry?

Info on this - [https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-faraday/v0.16.0/](https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-faraday/v0.16.0/) - could be nice to add instructions to the README if people would find it useful

This would be cool and a well used feature I think, definitely open to a PR on it

I merged that example so it's in the main README now @kris2150. Can you try that example and let us know if it's working for you?

Cool, thank you @ajGingrich! Have you tested this does work with both versions of Faraday?

@ajGingrich I would definitely prefer that as it could affect tens of thousands of people if we get it wrong :) I always try to test PRs as much as...

eep, you're right... I think we need to require faraday json response and request middleware, but can't find the right library 🤔 Thanks for checking, that's a really good spot

If we can fix this, could be nice to add Faraday 1 + 2 to the CircleCI matrix so both get tested.