Skip to content

fix(tracing): respect model-data logging redaction for record_model_error_on_span - #4496

Merged
seratch merged 2 commits into
openai:mainfrom
sylvesterkaczmarek:fix/model-error-redacted-logging
Aug 17, 2026
Merged

fix(tracing): respect model-data logging redaction for record_model_error_on_span#4496
seratch merged 2 commits into
openai:mainfrom
sylvesterkaczmarek:fix/model-error-redacted-logging

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor

Summary

  • route model-span annotation failures through the SDK's model-data-aware logging helper
  • avoid attaching traceback or exception data when model-data logging is disabled
  • preserve diagnostic exception logging when model-data logging is enabled

record_model_error_on_span() is best-effort and should never turn tracing into a data leak. Previously its fallback logger.warning(..., exc_info=True) bypassed the SDK logging redaction policy.

Test plan

  • added focused regression coverage in tests/test_model_error_logging_redaction.py
  • GitHub Actions

Issue number

N/A

@sylvesterkaczmarek
sylvesterkaczmarek marked this pull request as ready for review August 17, 2026 21:08
@seratch seratch added this to the 0.21.x milestone Aug 17, 2026
@seratch seratch changed the title fix(tracing): respect model-data logging redaction fix(tracing): respect model-data logging redaction for record_model_error_on_span Aug 17, 2026
@seratch
seratch merged commit 62f02e3 into openai:main Aug 17, 2026
15 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.

2 participants