feat(temporal): add temporal integrations auto instrumentation#367
Merged
Abhijeet Prasad (AbhiPrasad) merged 3 commits intomainfrom Apr 29, 2026
Merged
Conversation
Temporal is now available as a first-class integration via braintrust.auto_instrument(), which patches Temporal client and worker setup to install BraintrustPlugin automatically when temporalio is installed. New applications can enable Temporal tracing with: ```python import braintrust braintrust.auto_instrument() ``` For explicit setup without global auto-instrumentation, users can call setup_temporal(): ```python from braintrust.integrations.temporal import setup_temporal setup_temporal(project_name="my-project") ``` If an application manually constructs Temporal plugin lists, use BraintrustPlugin directly: ```python from braintrust.integrations.temporal import BraintrustPlugin plugins = [BraintrustPlugin(), *existing_plugins] ``` Migration guide: replace old contrib imports with integrations imports for new code: ```python # Before from braintrust.contrib.temporal import BraintrustPlugin, BraintrustInterceptor # After from braintrust.integrations.temporal import BraintrustPlugin, BraintrustInterceptor ``` Prefer braintrust.auto_instrument() for new applications. The braintrust.contrib.temporal module remains as a deprecated compatibility re-export for its previous public API: BraintrustPlugin and BraintrustInterceptor. README.md now lists Temporal as an auto-instrumented integration. Tests: nox -s "test_temporal(latest)"
The lazy `__getattr__` re-exports of `BraintrustInterceptor` and `BraintrustPlugin` were tripping pylint's `undefined-all-variable` and `no-name-in-module` checks. Adding a TYPE_CHECKING import makes the names visible to static analysis without forcing temporalio to load at import time. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Merged
Luca Forstner (lforst)
approved these changes
Apr 29, 2026
Merged
Abhijeet Prasad (AbhiPrasad)
added a commit
that referenced
this pull request
May 4, 2026
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Temporal is now available as a first-class integration via braintrust.auto_instrument(), which patches Temporal client and worker setup to install BraintrustPlugin automatically when temporalio is installed.
New applications can enable Temporal tracing with:
For explicit setup without global auto-instrumentation, users can call setup_temporal():
If an application manually constructs Temporal plugin lists, use BraintrustPlugin directly:
Migration guide: replace old contrib imports with integrations imports for new code:
Prefer braintrust.auto_instrument() for new applications. The braintrust.contrib.temporal module remains as a deprecated compatibility re-export for its previous public API: BraintrustPlugin and BraintrustInterceptor.