Skip to content

Fix critical tracing module issues and improve reliability #962

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mshsheikh
Copy link

  1. Typecheck Fixes:
    • Explicitly export set_trace_provider/get_trace_provider in all to resolve mypy errors.
    • Add DefaultTraceProvider to all for consistency.

  2. Reliability Improvements:
    • Prevent crashes when custom providers lack a shutdown() method (via hasattr check).
    • Raise clear RuntimeError for invalid AGENT_TRACE_PROVIDER values instead of silently falling back.

  3. Code Quality:
    • Reordered imports for PEP8 compliance and readability.
    • Simplified error handling in provider initialization.

  4. Documentation:
    • Updated logging to use logging.debug for success messages and logging.warning for failures.

1. Typecheck Fixes:
• Explicitly export set_trace_provider/get_trace_provider in __all__ to resolve mypy errors.
• Add DefaultTraceProvider to __all__ for consistency.

2. Reliability Improvements:
• Prevent crashes when custom providers lack a shutdown() method (via hasattr check).
• Raise clear RuntimeError for invalid AGENT_TRACE_PROVIDER values instead of silently falling back.

3. Code Quality:
• Reordered imports for PEP8 compliance and readability.
• Simplified error handling in provider initialization.

4. Documentation:
• Updated logging to use logging.debug for success messages and logging.warning for failures.
@seratch
Copy link
Member

seratch commented Jun 28, 2025

Looks duplicate of #957

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