Skip to content

feat(mastra): Route traces by logger - #2838

Open
Luca Forstner (lforst) wants to merge 2 commits into
mainfrom
lforst/dum-e/geneva-dc29936375
Open

Luca Forstner (lforst) wants to merge 2 commits into
mainfrom
lforst/dum-e/geneva-dc29936375

Conversation

@lforst

Copy link
Copy Markdown
Member

closes SDK-826

  • BraintrustObservabilityExporter now accepts a Braintrust logger or a function that selects one for each Mastra trace. This lets agents share an exporter and send traces to different Braintrust projects.
    new BraintrustObservabilityExporter({
      // Choose a logger for the whole trace from the root span's entity ID.
      logger: (root) => root.entityId === "support" ? supportLogger : defaultLogger,
    });
  • Previously, the exporter could attach later runs to the first active Braintrust span it saw. It now tracks each Mastra trace separately. If Mastra skips an internal span, its children attach to their own trace’s root.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 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-24T17:56:58.427371Z c84e7ab 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