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(toolbar): Add setup instructions for the Sentry Toolbar using the react hook useSentryToolbar #12845

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented Feb 26, 2025

This adds some information about the new react hook useSentryToolbar to the Toolbar Setup instructions, and tries to streamline the instructions in the process (it was getting crazy talking about CDN and react at the same time).

Some of that streamlining is because I moved some content out to the FAQ and linked to it, instead of including it on the setup page.

The pages you can checkout in the preview build are:

  • /product/dev-toolbar/setup/
  • /product/dev-toolbar/faq/

Depends on getsentry/sentry-toolbar#223 being published to npm.

Copy link

vercel bot commented Feb 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 26, 2025 6:22pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 6:22pm
develop-docs ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 6:22pm

@ryan953 ryan953 requested review from jas-kas and a team February 26, 2025 01:01
Copy link

codecov bot commented Feb 26, 2025

Bundle Report

Changes will increase total bundle size by 84 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 10.19MB 90 bytes (0.0%) ⬆️
sentry-docs-client-array-push 9.38MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 868.04kB -0.0%
static/chunks/4028-*.js -3 bytes 393.29kB -0.0%
static/Rst4ZYsNPu4bvsT5zXOdA/_buildManifest.js (New) 578 bytes 578 bytes 100.0% 🚀
static/Rst4ZYsNPu4bvsT5zXOdA/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/G-*.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
static/G-*.js (Deleted) -578 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.46MB -0.0%
../instrumentation.js -3 bytes 791.26kB -0.0%
9523.js -3 bytes 767.46kB -0.0%
../app/[[...path]]/page.js.nft.json 33 bytes 382.24kB 0.01%
../app/platform-redirect/page.js.nft.json 33 bytes 382.15kB 0.01%
../app/sitemap.xml/route.js.nft.json 33 bytes 380.12kB 0.01%

@@ -4,6 +4,55 @@ sidebar_order: 30
description: "Frequently asked questions about the Dev Toolbar."
---

<Expandable title="In what environments should I enable the Dev Toolbar?">
Copy link
Member

Choose a reason for hiding this comment

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

I had suggested to name the npm package developer toolbar (I don't have strong feels about it), but if "Dev Toolbar" is the official product name for it, we should make the npm package name match.

(why can't this be "Sentry Toolbar", does it need dev at all?)

Copy link
Member Author

Choose a reason for hiding this comment

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

renaming the thing makes sense. the repo is called sentry-toolbar already.

I think using development, especially in the npm package name, was meant to make it not sound like an environment or a dev/alpha/beta tag. A proper rename avoids any confusion in that area.

Copy link
Member Author

Choose a reason for hiding this comment

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

Put up a rename PR: getsentry/sentry-toolbar#223

The current state is that the npm publish of @sentry/developer-toolbar (the old name) isn't complete yet, there's a bug in the pipeline.

I've asked for help with that pipeline bug, so if it's not disruptive to debugging we can land the rename name. I'll check in on that. Otherwise I might just keep working at that pipeline problem first which means we will publish the old name once. After that's working we can land the rename.

- In production environments, do not initialize the Toolbar.

Initializing the Dev Toolbar allows all developers and testers can use it and quickly go from the page they're looking at back to Sentry for further debugging.
In production it can make it easier for developers to reproduce issues, but it should not be initialized for all users of the site -- only when an employee/engineer/etc visits.
Copy link
Member

Choose a reason for hiding this comment

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

Feels like this warrants an alert-style component

@ryan953 ryan953 changed the title feat(toolbar): Add setup instructions for the Dev Toolbar using the react hook useSentryToolbar feat(toolbar): Add setup instructions for the Sentry Toolbar using the react hook useSentryToolbar Feb 26, 2025
ryan953 and others added 2 commits February 26, 2025 09:53
Co-authored-by: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com>
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.

3 participants