Skip to content

Handle processor exceptions and fix tracing log formatting #1292

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

Merged
merged 1 commit into from
Aug 1, 2025

Conversation

mshsheikh
Copy link
Contributor

  • Wrap each call in SynchronousMultiTracingProcessor (on_trace_start, on_trace_end, on_span_start, on_span_end, shutdown, force_flush) in a try/except so one failing processor won’t prevent the others from running.

  • Add a missing space in the logger.error message when no active trace is found, ensuring it reads “…first Returning NoOpSpan.” cleanly.

* Wrap each call in `SynchronousMultiTracingProcessor` (`on_trace_start`, `on_trace_end`, `on_span_start`, `on_span_end`, `shutdown`, `force_flush`) in a `try/except` so one failing processor won’t prevent the others from running.

* Add a missing space in the `logger.error` message when no active trace is found, ensuring it reads “…first Returning NoOpSpan.” cleanly.
Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

in general, on_xxx callbacks are responsible to handle runtime exceptions, but having these should be good to go; @rm-openai can you review this just in case?

@rm-openai rm-openai merged commit 5e31be9 into openai:main Aug 1, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants