Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nuxt): Adding experimental_basicServerTracing option to Nuxt module #13643

Merged
merged 8 commits into from
Sep 13, 2024

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Sep 10, 2024

Enabling this option will import the Sentry server config at the top of the server entry file. This can be used when adding the node option --import does not work. This however only comes with limited tracing functionality.

Example Usage:

export default defineNuxtConfig({
  sentry: {
    // ... other options
    experimental_basicServerTracing: true
  },
})

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add a note about this to the readme?

@lforst
Copy link
Member

lforst commented Sep 10, 2024

Example Usage:

export default defineNuxtConfig({
  sentry: {
    // ... other options
    simplifiedDeployment: true
  },
})

Correct me if I'm wrong but the way this option is defined here, it will not be properly typed and supported in the user's language server right?

Additionally, I would make the name a) a bit more dangerous sounding b) actually name it after what it does, because right now it sounds very good, even though it is a workaround. E.g. injectSentryConfigInServerBundleWorkaround <- this name obviously also sucks but it doesn't hide what it does from users.

Copy link
Contributor

github-actions bot commented Sep 10, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.52 KB - -
@sentry/browser - with treeshaking flags 21.3 KB - -
@sentry/browser (incl. Tracing) 34.79 KB - -
@sentry/browser (incl. Tracing, Replay) 71.25 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.69 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 75.59 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 88.32 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90.16 KB - -
@sentry/browser (incl. metrics) 26.83 KB - -
@sentry/browser (incl. Feedback) 39.6 KB - -
@sentry/browser (incl. sendFeedback) 27.19 KB - -
@sentry/browser (incl. FeedbackAsync) 31.9 KB - -
@sentry/react 25.28 KB - -
@sentry/react (incl. Tracing) 37.75 KB - -
@sentry/vue 26.72 KB - -
@sentry/vue (incl. Tracing) 36.66 KB - -
@sentry/svelte 22.66 KB - -
CDN Bundle 23.77 KB - -
CDN Bundle (incl. Tracing) 36.49 KB - -
CDN Bundle (incl. Tracing, Replay) 70.95 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 76.26 KB - -
CDN Bundle - uncompressed 69.65 KB - -
CDN Bundle (incl. Tracing) - uncompressed 108.23 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.01 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 233.21 KB - -
@sentry/nextjs (client) 37.51 KB - -
@sentry/sveltekit (client) 35.36 KB - -
@sentry/node 120.5 KB -0.01% -1 B 🔽
@sentry/node - without tracing 92.78 KB - -
@sentry/aws-serverless 102.49 KB - -

View base workflow run

*
* @default false
*/
simplifiedDeployment?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧵 name bikeshedding :D

Some ideas:

  • basicTracingOnlyDeployment
  • noImportFlagDeployment
  • noImportFlagEnvironment

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about a workaround_ prefix?

  1. workaround_injectSentryConfigIntoServer
  2. workaround_basicTracingWithServerConfigInject

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no strong feelings either way! IMHO the question is, do we want to describe what the flag does, or when you need it? Describing what it does is obviously technically correct, but maybe makes it harder to understand when you would/should actually use this. I'll happily defer to you and other folks on the team about the name for this! We can also start with something like experimental_XXXX - we can still promote it to a non-experimental name later, if needed/wanted!

@s1gr1d
Copy link
Member Author

s1gr1d commented Sep 10, 2024

will not be properly typed and supported in the user's language server right

@lforst This option is added to the module types and TS the language server picks that up
image

And I will change the name, wasn't so sure about it anyway so thanks for the suggestions 🙌

@s1gr1d s1gr1d requested review from mydea and lforst September 10, 2024 15:20
*
* @default false
*/
experimental_basicServerTracing?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a reminder to also update the PR title accordingly ;)

@s1gr1d s1gr1d changed the title feat(nuxt): Adding simplifiedDeployment option to Nuxt module feat(nuxt): Adding experimental_basicServerTracing option to Nuxt module Sep 10, 2024
@s1gr1d s1gr1d enabled auto-merge (squash) September 13, 2024 07:35
@s1gr1d s1gr1d merged commit df79871 into develop Sep 13, 2024
101 checks passed
@s1gr1d s1gr1d deleted the sig/nuxt-simplified-deploy branch September 13, 2024 07:48
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