Conversation
2bed349 to
da62136
Compare
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
da62136 to
fce00c7
Compare
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 8c710e0 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
fce00c7 to
c870b10
Compare
4e0030b to
fdd1422
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdd1422e2d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| componentStack: info || undefined, | ||
| startClocks, | ||
| context: { | ||
| ...(error as Error & { dd_context?: Context }).dd_context, |
There was a problem hiding this comment.
Guard dd_context access for nullish thrown values
addVueError intentionally accepts error: unknown, but the context merge currently does ...(error as Error & { dd_context?: Context }).dd_context unconditionally. If Vue forwards a non-Error throw like null or undefined (which is valid JavaScript and permitted by app.config.errorHandler’s unknown type), this property access throws before addError is called, so the original Vue error is lost and the error handler itself can fail. Please extract dd_context only after checking the value is indexable/object-like.
Useful? React with 👍 / 👎.
fdd1422 to
a7152dd
Compare
a7152dd to
3a8e944
Compare
3a8e944 to
8c710e0
Compare
Motivation
Second of five PRs (#4325 is the first one). First one with actual user-facing code. After this, Vue apps can report errors to Datadog with Vue-specific context.
Changes
vuePlugin()is the RUM plugin Vue apps register viadatadogRum.init({ plugins: [vuePlugin()] }). It uses the same module-level subscriber pattern asreactPlugin:onVueInitandonVueStarthooks let features queue work until the plugin initializes, so call order doesn't matter.vuePlugin({ router: true })additionally setstrackViewsManually: trueto disable the SDK's automatic URL tracking, which PR 3 takes over with parameterized route names.addVueErrormatches Vue'sapp.config.errorHandlersignature exactly, so it can be assigned directly without a wrapper:Vue's
infostring (e.g."mounted hook","v-on handler") maps tocomponent_stack.context.frameworkis set to"vue". Errors thrown beforedatadogRum.init()are queued and flushed when RUM starts.The implementation uses
addErrorfromStartRumResultdirectly, the same pattern introduced in #4343 foraddNextjsError, rather than constructing the event manually withaddEvent.Test instructions
Checklist