File tree Expand file tree Collapse file tree
packages/core/src/tracing/vercel-ai Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/* eslint-disable max-lines */
22import type { Client } from '../../client' ;
33import { getClient } from '../../currentScopes' ;
4- import { hasSpanStreamingEnabled } from '../../tracing/spans/hasSpanStreamingEnabled' ;
54import { SEMANTIC_ATTRIBUTE_SENTRY_OP , SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes' ;
5+ import { shouldEnableTruncation } from '../ai/utils' ;
66import type { Event } from '../../types-hoist/event' ;
77import type { Span , SpanAttributes , SpanAttributeValue , SpanJSON } from '../../types-hoist/span' ;
88import { spanToJSON } from '../../utils/spanUtils' ;
@@ -120,7 +120,7 @@ function onVercelAiSpanStart(span: Span): void {
120120 const integration = client ?. getIntegrationByName ( 'VercelAI' ) as
121121 | { options ?: { enableTruncation ?: boolean } }
122122 | undefined ;
123- const enableTruncation = integration ?. options ?. enableTruncation ?? ! ( client && hasSpanStreamingEnabled ( client ) ) ;
123+ const enableTruncation = shouldEnableTruncation ( integration ?. options ?. enableTruncation ) ;
124124
125125 processGenerateSpan ( span , name , attributes , enableTruncation ) ;
126126}
You can’t perform that action at this time.
0 commit comments