Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions docs/contributing/pages/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -378,21 +378,20 @@ Attributes:

## Onboarding Options

If you're writing product feature specific docs, you can specify code block `onboardingOptions` metadata:
If you're writing product feature specific docs, you can specify markers within code blocks that enable or disable certain parts of snippets:

````markdown
```go {"onboardingOptions": {"performance": "13-17"}}
// your code here
```go
// ___product_option_start___ performance
// your code here
// ___product_option_end___ performance
```
````

the general syntax is `{"onboardingOptions": {"feature": "range"}}` where `feature` is the feature id
and `range` is the corresponding line range (similar to the line highlighting syntax).
the general syntax is `// ___product_option_start___ feature` where `feature` is the feature id (e.g. `performance`, `profiling` or `session-replay`).

You can specify multiple features by separating them with a comma:

`{"onboardingOptions": {"performance": "13-17", "profiling": "5-6"}}`

The range visibility will be controlled by the `OnboardingOptionButtons` component:

```jsx diff
Expand Down Expand Up @@ -427,7 +426,7 @@ Example (output of the above):
dontStick
/>

```go {"onboardingOptions": {"performance": "13-17"}}
```go
import (
"fmt"
"net/http"
Expand All @@ -440,11 +439,13 @@ import (
// To initialize Sentry's handler, you need to initialize Sentry itself beforehand
if err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// ___product_option_start___ performance
EnableTracing: true,
// Set TracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// ___product_option_end___ performance
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
Expand Down