-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: Rework Browser JS integration docs #7648
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ad4a1c6
to
c2f13a0
Compare
Note: We can/should also improve this page a bit, maybe: https://sentry-docs-git-fn-js-integrations.sentry.dev/platforms/javascript/configuration/integrations/custom/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change!! The individual pages make a lot more sense to me, and hopefully is easier to maintain as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still working through this :)
@@ -99,6 +99,6 @@ As a best practice you should always avoid logging confidential information. If | |||
|
|||
- Anonymize the confidential information within the log statements (for example, swap out email addresses -> for internal identifiers) | |||
- Use <PlatformIdentifier name="before-breadcrumb" /> to filter it out from breadcrumbs before it is attached | |||
- Disable logging breadcrumb integration (for example, as described [here](/platforms/javascript/configuration/integrations/default/#breadcrumbs)) | |||
- Disable logging breadcrumb integration (for example, as described [here](/platforms/javascript/configuration/integrations/breadcrumbs/)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Disable logging breadcrumb integration (for example, as described [here](/platforms/javascript/configuration/integrations/breadcrumbs/)) | |
- Disable the breadcrumb logging integration (read more [here](/platforms/javascript/configuration/integrations/breadcrumbs/)) |
There isn't anything on the Breadcrumbs page we're linking to that specifically says "how to disable the breadcrumb logging integration" - is it possible to write brief instructions for how to do it here and save our users an extra click? Is it as easy as disabling the Sentry.Integrations.Breadcrumbs
integration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well then you disable all breadcrumbs, you're gonna want to do this:
integrations: [
new Sentry.Integrations.Breadcrumbs({
console: false
})
]
to only disable console breadcrumbs. But based on this, let's add a sentence to the breadcrumbs integration page explicitly pointing out that the options below are meant to disable specific breadcrumbs, and why you may want to do this 👍
src/platforms/javascript/common/configuration/integrations/breadcrumbs.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/common/configuration/integrations/debug.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/common/configuration/integrations/debug.mdx
Outdated
Show resolved
Hide resolved
|
||
This integration deduplicates certain events. It can be helpful if you're receiving many duplicate errors. Note, that Sentry only compares stack traces and fingerprints. | ||
|
||
<PlatformContent includePath="configuration/dedupe" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that doesn't work in the preview! sentry always redirects back to docs.sentry.io and there the page does not exist 😅 (same for all of these)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, that makes sense!
src/platforms/javascript/guides/electron/configuration/integrations/childprocess.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/guides/electron/configuration/integrations/childprocess.mdx
Show resolved
Hide resolved
src/platforms/javascript/guides/electron/configuration/integrations/electronbreadcrumbs.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/guides/electron/configuration/integrations/electronbreadcrumbs.mdx
Show resolved
Hide resolved
src/platforms/javascript/guides/electron/configuration/integrations/mainprocesssession.mdx
Outdated
Show resolved
Hide resolved
158d628
to
f69ce5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change! Makes the structure much more clear and easier to navigate between individual integrations! I have a few high-level comments. Feel free to apply/disregard as you see fit. We can also tackle them as a follow-up.
- m: I'd like to see on first glance which integrations are enabled by default and which need to be added by users. Maybe we can put this directly under the title of the individual pages? Given that we're no longer distinguishing between default and pluggable integrations I think this is important. wdyt?
- l: Great that we now have a dedicated Options section! More a cosmetic thing than anything but can we give the individual options a heading level? This way we can link to specific options and I guess it'd look a little better than the bullet points
- l: Totally optional but wdyt about adding
BrowserTracing
andReplay
to the list? We shouldn't duplicate information there but just link to the dedicated performance/replay docs.
src/includes/platforms/configuration/options/ignore-transactions.mdx
Outdated
Show resolved
Hide resolved
Oh btw, great decision to move the Vue/React router stuff into the "[Framework] Features" section - I like it! |
OK, I updated this based on feedback by @Lms24:
|
description: "Capture performance data for the Browser." | ||
sidebar_order: 99 | ||
notSupported: | ||
- javascript.cordova |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, not sure why cordova does not have a performance section? 🤔
description: "Capture a video-like reproduction of what was happening in the user's browser." | ||
sidebar_order: 99 | ||
notSupported: | ||
- javascript.cordova |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there is a reason cordova does not have a replay section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for applying my feedback!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phew!! Thanks for this amazing, labor-intensive PR!
|
||
This integration deduplicates certain events. It can be helpful if you're receiving many duplicate errors. Note, that Sentry only compares stack traces and fingerprints. | ||
|
||
<PlatformContent includePath="configuration/dedupe" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, that makes sense!
src/platforms/javascript/guides/electron/configuration/integrations/childprocess.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/guides/electron/configuration/integrations/maincontext.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/guides/electron/configuration/integrations/net.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/guides/electron/configuration/integrations/net.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/guides/electron/configuration/integrations/onuncaughtexception.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/guides/electron/configuration/integrations/preloadinjection.mdx
Outdated
Show resolved
Hide resolved
src/platforms/javascript/guides/electron/configuration/integrations/sentryminidump.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few questions from me here
## Available Integrations | ||
|
||
<PageGrid exclude={["custom"]} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we might want to move this below the instructions for adding/removing/custom integrations. That info is important and is very easy to miss with this long list of integrations folks won't scroll through.
These integrations are listed in the sidebar too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 sure, I can move it down!
description: "Adds app, operating system and runtime context to all events. (default)" | ||
sidebar_order: 10 | ||
redirect_from: | ||
- /platforms/javascript/guides/electron/configuration/integrations/default/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a better redirect to /platforms/javascript/guides/electron/configuration/integrations/ using vercel.json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, will replace this with a proper redirect for all!
const aBase = a.context.sidebar_order ?? 10; | ||
const bBase = b.context.sidebar_order ?? 10; | ||
const aso = aBase >= 0 ? aBase : 10; | ||
const bso = bBase >= 0 ? bBase : 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, forgot to mention this: I noticed that this was actually buggy before, because sidebar_order
was sometimes null
which lead to it not getting the default of 10, but null, leading to incorrect ordering etc.
Co-authored-by: Liza Mock <liza.mock@sentry.io>
Co-authored-by: Liza Mock <liza.mock@sentry.io>
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
Co-authored-by: Liza Mock <liza.mock@sentry.io>
67c63ce
to
44f8e00
Compare
This PR rewrites & reorganizes the integration docs for Browser JS SDKs.
Now, there is a single
Integrations
page that lists all integrations available for this SDK, with a short description & a note if it is enabled by default.Each integration has it's own detail page with eventually available options.
The one special case is Electron, which does not have the same default integrations. I found a way to hide the parent pages for Electron, maybe a bit hacky (??) but it seems to work fine... 🤷
Another change I had to make to make this work/make sense is to move React/Vue Router & Redux pages, which have been inside of Integrations, into the React/Vue Features space. IMHO that makes more sense anyhow, as it is not really integrations this is about...?
Note that this does not touch Node.js yet, we can do that in a follow up.