Skip to content

Commit 8beaa13

Browse files
fix(node): Drop deprecated forceTransaction in Mastra exporter
Oxlint no-deprecated fails on the new startInactiveSpan call; nesting still uses parentSpan ?? activeSpan, and a missing parent already creates a root span. Co-Authored-By: Cursor Grok 4.6 <cursoragent@cursor.com>
1 parent 5572ab8 commit 8beaa13

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • packages/server-utils/src/ai/mastra

packages/server-utils/src/ai/mastra/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,8 @@ export class SentryMastraExporter implements MastraObservabilityExporter {
128128
const sentrySpan = startInactiveSpan({
129129
name: getSpanName(span),
130130
startTime: span.startTime,
131-
// Nest under the Mastra parent, else the active request span; only force a transaction if neither exists.
131+
// Prefer the Mastra parent so the tree stays together; else the active request span.
132132
parentSpan: parentSpan ?? activeSpan,
133-
forceTransaction: !parentSpan && !activeSpan,
134133
attributes: {
135134
...this._attributesFor(span),
136135
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: getOperation(span.type)?.op,

0 commit comments

Comments
 (0)