Skip to content

feat!: Add BRAINTRUST_CAPTURE_ATTACHMENTS env var option and captureAttachments logger option for all integrations - #2519

Open
Luca Forstner (lforst) wants to merge 2 commits into
mainfrom
lforst/dum-e/melbourne-016f9385a8
Open

Luca Forstner (lforst) wants to merge 2 commits into
mainfrom
lforst/dum-e/melbourne-016f9385a8

Conversation

@lforst

Copy link
Copy Markdown
Member

Ref braintrustdata/braintrust-sdk-javascript#1841

  • Make automatic attachment capture opt-in across all integrations using the existing BRAINTRUST_CAPTURE_ATTACHMENTS environment variable; previously, integrations applied this setting inconsistently.
  • Add initLogger({ captureAttachments: true | false }) to override the environment setting. Loggers created with setCurrent: false keep their own policy, independent of the global logger.
  • When capture is disabled, omit inline media and skip unnecessary decoding, copying, and buffering. Preserve text, metadata, metrics, remote URLs, and explicitly logged attachments.
  • Keep the owning logger’s policy throughout asynchronous calls and streaming responses, with unit, integration, and replay tests covering these behaviors.

…reAttachments` logger option for all integrations
@lforst Luca Forstner (lforst) mentioned this pull request Sep 24, 2026
14 tasks

This branch has not been deployed

No deployments
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.

1 participant