Skip to content

Conversation

@lobsterkatie
Copy link
Member

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.

@github-actions
Copy link
Contributor

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 22.47 KB (0%)
@sentry/browser - Webpack 23.35 KB (0%)
@sentry/react - Webpack 23.38 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.92 KB (0%)

@lobsterkatie lobsterkatie merged commit 1b8bfeb into master Oct 26, 2021
@lobsterkatie lobsterkatie deleted the kmclb-nextjs-tag-vercel-events branch October 26, 2021 20:00
@iker-barriocanal
Copy link
Contributor

Instead of vercel: true, what do you think if we add a more generic tag like context: vercel? This will allow us in the future to add more values without adding more tags, which will also make queries simpler (and easier to not leave any data out of the results if we have more tag formats).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants