-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Global Getting Started #2336
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
Global Getting Started #2336
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/sentry/sentry-docs/l2nlp72by/sentry.dev |
Co-authored-by: David Cramer <[email protected]>
Co-authored-by: Daniel Griesser <[email protected]>
@@ -9,3 +9,5 @@ try { | |||
Sentry.captureException(err); | |||
} | |||
``` | |||
|
|||
Learn more about how to manually capture errors or enable message capture with Sentry's JavaScript SDK in [our documentation on Usage](/platforms/javascript/usage/). |
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.
One concern we might have here is javascript can be included in other pages, so this would link to the wrong platform.
We could embed a <PlatformLink>
to solve for that:
https://docs.sentry.io/contributing/pages/components/#platformlink
<PlatformLink to="/usage/">our documentation on Usage</PlatformLink>
(didnt test but should work)
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. I'll give that a go.
tracesSampleRate: 1.0, // We recommend adjusting this in production | ||
}); | ||
|
||
if (environment.production) { |
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.
is this all normal angular code? is there a reason we need to include it?
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.
@HazAT - can you please take a look?
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, it's in the default boilerplate when you create a new project.
But tbh not sure if relevant to include so let's remove.
@@ -1,15 +1,14 @@ | |||
You should `init` the Sentry Browser SDK as soon as possible during your page load: | |||
This snippet includes: |
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.
imo you do not need to tell developers this. if we have to spell out everything we're doing we're going to end up with too much boilerplate. i recognize the goal but I think we need to find a simplified way to achieve "want more information on releases? go here but you can figure out how to at least configure it without that"
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.
Trimmed it down further.
@@ -0,0 +1,11 @@ | |||
- **[Upload Source Maps](/platforms/javascript/sourcemaps/)** |
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.
this file looks the same as the javascript file?
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.
My error - I should have removed this when I added PageGrid header="Next Steps" nextSteps
. Thanks for the catch.
@@ -0,0 +1,3 @@ | |||
```javascript |
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.
this will automatically use the javascript file, you dont have to define it for angular
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. Will remove.
src/platforms/common/index.mdx
Outdated
|
||
<PlatformContent includePath="getting-started-config" /> | ||
|
||
<Alert level="note" title="Note"><markdown> |
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.
Make it a <Note>
(or delete it) given it literally doesnt matter to the developer right here, and they almost certainly already have been given it before.
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.
Moved this to the proper Note format. DSN is one of our most-searched terms, so I think worth keeping it here.
title: Angular | ||
caseStyle: camelCase | ||
supportLevel: production | ||
sdk: "sentry.javascript.browser" |
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.
this defaults to whatevers in javascript I believe so can probably remove it, same for caseStyle/supportLevel/categories
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.
Removed caseStyle, supportLevel, and sdk.
Co-authored-by: Daniel Griesser <[email protected]>
This PR creates a common, global Getting Started page which can be used if an SDK has the correct include statements in:
using the name of the SDK (for example, javascript.mdx or angular.mdx) as the file name in the folder.
If using the global getting started, the config.yml file must be present for that SDK.
Note: this global content uses our hierarchy, where we first display the guide (child of parent platform) content. If that is not present, we display the parent platform content. If that is not present, we display the global, or common, content.
One remaining piece of work is to link to the sampling content, which can either be incorporated into this PR or merged as a separate PR when the sampling PR (2376) is complete.