Conversation

mydea

By default, the instrumentation will register span processors only when the ai package is used. This is done to avoid overhead of span processing for users that do not even use this package.

However, it seems that in some environments, esp. in Next.js, the instrumentation is not added correctly, thus never running this, and not converting spans correctly. For now, this PR adds an escape hatch to manually opt-in to this to still get correct spans:

vercelAiIntegration({ force: true })

By default, the instrumentation will register span processors only when the ai package is used. This is done to avoid overhead of span processing for users that do not even use this package.

However, it seems that in some environments, esp. in Next.js, the instrumentation is not added correctly, thus never running this, and not converting spans correctly. For now, this PR adds an escape hatch to manually opt-in to this to still get correct spans:

```js
vercelAiIntegration({ force: true })
```
@mydeamydea self-assigned this Jun 11, 2025
@mydeamydea merged commit 88e3f8f into develop Jun 11, 2025
117 checks passed
@mydeamydea deleted the fn/ai-force branch June 11, 2025 14:32
AbhiPrasad added a commit to getsentry/sentry-docs that referenced this pull request Jun 18, 2025
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.