Skip to content

feat(langchain): Add capture controls - #2763

Open
Luca Forstner (lforst) wants to merge 3 commits into
mainfrom
lforst/dum-e/dubai-a933bdfb63
Open

Luca Forstner (lforst) wants to merge 3 commits into
mainfrom
lforst/dum-e/dubai-a933bdfb63

Conversation

@lforst

Copy link
Copy Markdown
Member
  • Add separate controls for chain inputs, chain outputs, model inputs, model outputs, and token usage in LangChain and LangGraph traces. Capture remains enabled by default.
  • Skip disabled payloads before copying them, while keeping the trace structure, timing, errors, and metadata. This avoids copying large graph state or recording model data already captured by provider instrumentation.
  • Support these options in manual callback handlers and automatic instrumentation:
    import { configureInstrumentation } from "braintrust/instrumentation";
    
    // Configure capture before SDK initialization or loading the tracing hook.
    configureInstrumentation({
      langchain: {
        captureChainInputs: false,
        captureChainOutputs: false,
        captureModelInputs: false,
        captureModelOutputs: false,
        captureModelTokenUsage: false,
      },
    });

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T10:39:08.480011Z 3c6689a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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