Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
| children?: React.ReactNode; | ||
| noGuides?: boolean; | ||
| notSupported?: string[]; | ||
| notSupported?: `${PlatformCategory}`[]; |
There was a problem hiding this comment.
Actually I wonder if we can remove that enum and just use string literals there overall, could not find a place where this was really used that way, but not sure... cc @chargome
There was a problem hiding this comment.
Yeah getting rid of enums per se I think is a good idea, also could't spot anything where this would be actually used
There was a problem hiding this comment.
I actually extracted this out a bit here: #12558
7dc93a6 to
9cbb304
Compare
Lms24
left a comment
There was a problem hiding this comment.
I really like this rewrite! IMHO, this is much cleaner than the previous "Basic Options" page, both in description as well as UI. Love the table with the type and default value information.
I read through the options (haven't done this in a while) and had some minor suggestions. Once this is out of draft state, I'm happy to ✅ !
|
|
||
| </SdkOption> | ||
|
|
||
| <SdkOption name="tracePropagationTargets" type='Array<string | RegExp>'> |
There was a problem hiding this comment.
I'd also add a default value entry into the table. Which needs to be different on browser and server.
There was a problem hiding this comment.
yeah this is a bit tricky because 1. it is hard to implement this nicely (we can, if we want to) and especially 2. the default value here is not an actual value but computed (e.g. based on the current host), which is why I opted to rather explain the default in this case?
There was a problem hiding this comment.
idea (logaf-l) should we then add something liks "see description" for the default value field?
| </a> | ||
| </h3> | ||
|
|
||
| <table className="w-auto"> |
There was a problem hiding this comment.
WDYT about wrapping this table with a border radius? (same value as the alert)
There was a problem hiding this comment.
I updated it, it's a bit tricky because apparently border-collapse and border-radius do not like each other 😬 I ended up making the border 2px, which seems ok to me, but... 🤷
There was a problem hiding this comment.
Hmm tricky, the prose class also makes this harder. Looks better with 1px imo and we need to adapt it to dark mode – I can do that tomorrow if you want!
There was a problem hiding this comment.
some more hacking around, figured out a way to make 1px borders work!
| children?: React.ReactNode; | ||
| noGuides?: boolean; | ||
| notSupported?: string[]; | ||
| notSupported?: `${PlatformCategory}`[]; |
There was a problem hiding this comment.
Yeah getting rid of enums per se I think is a good idea, also could't spot anything where this would be actually used
|
That looks much clearer! |
I've thought about this too some, IMHO it makes sense to have them manually sorted - right now it is just the order that you put them into the mdx file! Once we have general agreement on the direction etc. I would take some time to reorder these better, for now I mostly just cobbled it together in the order it already was in basic options. |
Bundle ReportChanges will increase total bundle size by 7.67kB (0.04%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-server-cjsAssets Changed:
Files in
Files in
App Routes Affected:
view changes for bundle: sentry-docs-client-array-pushAssets Changed:
Files in
Files in
|
b75d0b6 to
fdbd537
Compare
|
I think this is ready for review now, I tried to address the things that have already been brought up. The options list itself for sure can use some more iteration and work, but IMHO we can do that step by step then too. |
coolguyzone
left a comment
There was a problem hiding this comment.
Thanks @mydea! I don't see any issues here, however since a lot of these changes are on the more technical side, please also make sure a docs engineer approves as well before merging.
chargome
left a comment
There was a problem hiding this comment.
Thanks for the update, let's ship it and maybe check if can render the ToC during build time in a follow up PR 👍
Co-authored-by: Charly Gomez <charly.gomez@sentry.io>
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
Co-authored-by: Charly Gomez <charly.gomez@sentry.io>
28ec6e3 to
0492f97
Compare
|
after talking with @stephanie-anderson , for now we leave it under configuration > options! |
After talking some about this with @lforst and @Lms24, and triggered by talks with @inventarSarah, I decided to make a POC of a new SDK Options page for the JS SDKs.
This was borne out of the following thoughts:
Configuration > Basic Options, which is a bit weird. First, it is pretty generic (originally applying to all SDKs, so containing a lot of generic language). Second, it is not fully up to date. And lastly, it is not really complete - some (many) options are described but not all.To improve on this, this PR introduces (for JS only, for now) a new top-level "SDK Options" nav item. This is a single page that contains all top-level SDK options that can be passed to
Sentry.init(). There are a few goals here:For this, I wrote two new components, a
<SdkOption>component, and a<SdkOptionOverview>which just auto-generates an index for this. You can put headings and text between those for sectioning and explanation.I also removed the old Basic options page as well as the transports page and folded that into the new page, adding redirects.
Some screenshots showing the different things:
Auto-generated Overview:

Option with env-var configuration:

Note that the
env varentry will not be shown in environments where this is not auto-picked up.Option with default value:
If in a meta-framework, options that are only available in one part or the other will be called out:

We can add more things to the SDK options if needed. The authoring experience with this should be pretty straightforward and make it easy to keep this up-to-date, hopefully.
Follow up
If this generally finds agreement, we can merge this. We should then make some passes over the actual options and make sure we add ones that have been forgotten, and/or improve docs on them where applicable. In some places, we have docs for options in more specific places, which should be folded into this page where possible.
When this is done, we would like to also add a top-level
SDK APIspage, which does the same thing but for APIs, e.g.Sentry.captureException(),Sentry.setTag()etc. We can discuss this more separately.The idea is that with these two pages, we'll be able to consolidate a good amount of the pages we currently have in various levels of nesting, and only keep additional pages for places where more explanation/examples are needed.