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

fix(openai): Fix with_raw_response redirect crashing span #536

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

tonybaloney
Copy link
Contributor

@tonybaloney tonybaloney commented Feb 27, 2024

Fixes #535

  • I have added tests that cover my changes.
  • If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
  • PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • (If applicable) I have updated the documentation accordingly.

@tonybaloney tonybaloney changed the title Fix with_raw_response redirect crashing span fix(openai): Fix with_raw_response redirect crashing span Feb 27, 2024
…hich has the .parse() method and then recursively calling the result so that span attributes are still captured
@@ -9,7 +9,7 @@ def test_chat_streaming(exporter, openai_client, vcr):
stream=True,
)

for part in response:
for _ in response:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has nothing to do with the mentioned bug, it was just bugging me :-)

@nirga
Copy link
Member

nirga commented Feb 27, 2024

Liked the TDD 😀

@nirga nirga merged commit 66e1c69 into traceloop:main Feb 27, 2024
6 checks passed
@tonybaloney tonybaloney deleted the raw_responses branch February 27, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: Calling openai methods in v1 SDK with with_raw_response redirect causes crash
2 participants