How to Write - Configuration
The Configuration section of the content covers, unsurprisingly, how customers can configure an SDK. A new framework can adopt the common content, which is stored in /docs/platforms/<SDK>/common/configuration/
- feel free to peruse the files in that directory to help answer any questions.
Don't change the common content. That change will ripple across all guides that rely on the common content. Instead, open an issue on GitHub with questions/suggestions.
Most of these pages are pretty self-evident, so only basic information is provided. But please ask questions if any questions arise by opening an issue on GitHub.
Determine if the page applies:
- If the content does not apply, add the guide to
notSupported
list in the frontmatter of the file. This will turn off the display of the content for this guide. - If the content does apply, add the
include
file to the correct directory as noted for each page. If the code sample is not provided, the page will display a big gray box requesting that customers open an issue for the missing sample.
This file is options.mdx
. It explains all the configuration options.
To develop content for this file:
Create the
configuration/config-intro/
statement, which covers how options can be set.For individual options that the guide does NOT support, add the name of the guide to the
ConfigKey
statement for that option. This will prevent that option from displaying for this SDK. For example:<ConfigKey name="debug" notSupported={["javascript.react"]}>
Alternately, for individual options that the guide DOES support, add the name of the guide to
ConfigKey
statement for that option, which ensures the option displays. For example:<ConfigKey name="send-default-pii" supported={["javascript.electron", "javascript.ember"]}>
For a grouping of options that the guide DOES support, add the name of the guide to the
PlatformSection
statement for those options, which ensures the option displays. For example:<PlatformSection supported={["javascript.react"]}>
This file is releases.mdx
. It explains how to configure the SDK to tell Sentry about releases. Provide a code sample for this SDK to set a release, then add the code sample to this directory:
/platform-includes/set-release/
A few nuances:
- If adding an SDK related to JavaScript, update the source maps-related paragraph, as appropriate, in the
PlatformSection supported
statement. - For SDKs that support release health, we control the display of content with a
PlatformSection supported
statement. For these SDKs, provide the following code sample: Opt out of auto session tracking, stored in/platform-includes/configuration/auto-session-tracking
.
This file is environments.mdx
. It explains how to configure the SDK to set an environment.
Add the code sample to this directory:
/platform-includes/set-environment/
This file is filtering.mdx
. It explains how to configure the SDK to filter events sent to Sentry. Add code samples to these directories:
/platform-includes/configuration/before-send/
/platform-includes/configuration/before-send-hint/
Enable or disable the content for "Using Hints", as appropriate to the SDK, by adding it to the list of either supported
or notSupported
, then add code sample to these directories:
/platform-includes/configuration/before-send-fingerprint/
/platform-includes/configuration/decluttering/
Enable or disable the content for "Using Sampling to Filter Transaction Events" by adding the SDK to the list of either supported
or notSupported
, then add code sample to this directory:
/platform-includes/performance/traces-sampler-as-filter/
This file is sampling.mdx
. It explains how to set the sample rate for the SDK.
Add code samples to these directories:
/platform-includes/configuration/sample-rate/
/platform-includes/performance/uniform-sample-rate/
/platform-includes/performance/sampling-function-intro/
/platform-includes/performance/default-sampling-context
/platform-includes/performance/custom-sampling-context
/platform-includes/performance/always-inherit-sampling-decision
/platform-includes/performance/force-sampling-decision
This file is draining.mdx
. Add the drain example content to this directory:
/platform-includes/configuration/drain-example/
This content is developed at the primary SDK/platform level. It resides in /docs/platforms/<SDK>/integrations/
or /docs/platforms/<SDK>/common/integrations/
and is typically composed of the following:
- Default Integrations -
default.mdx
- system integrations are enabled by default. We document them so customers can both be aware of what they do and disable them if they cause issues. - Pluggable Integrations -
plugin.mdx
- pluggable integrations are snippets of code that augment functionality for specific applications and/or frameworks. We document them so customers can see what they do and that they can be enabled. - Custom Integrations -
custom.mdx
- explains how to enable a custom integration.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").