Commit 1b8bfeb
authored
feat(nextjs): Tag backend events when running on vercel (#4091)
Because nextjs apps behave somewhat differently on vercel than off, it's helpful to know when an event came from a vercel-deployed app vs. a non-vercel-deployed app. This adds a tag to events from vercel, based on an environment variable which vercel sets in the serverless environment in which backend lambdas run.
Note: If the user has overridden the default and turned off `Automatically expose System Environment Variables` in their project settings, we won't know they're on vercel. That said, it's hard to know why one ever would, and likely most people don't, so presumably this data will be close enough to accurate to remain useful. See https://vercel.com/docs/concepts/projects/environment-variables#system-environment-variables.1 parent 7c15a97 commit 1b8bfeb
2 files changed
+27
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
66 | 90 | | |
67 | 91 | | |
68 | 92 | | |
| |||
0 commit comments