Skip to content

fix(mastra): emit tags as first-class Braintrust tags, not metadata#2212

Draft
Cedric / ViaDézo1er (viadezo1er) wants to merge 1 commit into
mainfrom
cedric/tags-export
Draft

fix(mastra): emit tags as first-class Braintrust tags, not metadata#2212
Cedric / ViaDézo1er (viadezo1er) wants to merge 1 commit into
mainfrom
cedric/tags-export

Conversation

@viadezo1er

Copy link
Copy Markdown
Contributor

buildMetadata placed exported.tags under metadata.tags, where Braintrust
does not surface them as tags. Move root-span tags to the top-level
tags row field (via ExperimentLogPartialArgs.tags) so they appear as
first-class, filterable tags. Matching @mastra/braintrust, tags are only
attached to the Mastra root span (Braintrust tags are trace-level).

Verified empirically that span.log({ tags }) writes the top-level tags
field while metadata.tags stays inert. Adds js/src/wrappers/mastra.test.ts.

Ports mastra-ai/mastra#12057 (re-fixes #9849).

buildMetadata placed exported.tags under metadata.tags, where Braintrust
does not surface them as tags. Move root-span tags to the top-level
`tags` row field (via ExperimentLogPartialArgs.tags) so they appear as
first-class, filterable tags. Matching @mastra/braintrust, tags are only
attached to the Mastra root span (Braintrust tags are trace-level).

Verified empirically that span.log({ tags }) writes the top-level tags
field while metadata.tags stays inert. Adds js/src/wrappers/mastra.test.ts.

Ports mastra-ai/mastra#12057 (re-fixes #9849).
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