-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
chore: update SDK onboarding pages #104234
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
Draft
JoshuaMoelans
wants to merge
6
commits into
master
Choose a base branch
from
joshua/chore/logs_onboarding
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
beb69a4
add to withLoggingOnboarding
JoshuaMoelans d99c0cd
add native logs onboarding
JoshuaMoelans b78c66f
Add logs onboarding for dotnet, symfony and unreal
JoshuaMoelans adb31a1
add tracing to native/unity/unreal
JoshuaMoelans a131785
fixup native onboarding
JoshuaMoelans ebda621
add mock for native onboarding
JoshuaMoelans File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| import {ExternalLink} from 'sentry/components/core/link'; | ||
| import type { | ||
| DocsParams, | ||
| OnboardingConfig, | ||
| } from 'sentry/components/onboarding/gettingStartedDoc/types'; | ||
| import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; | ||
| import {t, tct} from 'sentry/locale'; | ||
|
|
||
| type Params = DocsParams; | ||
|
|
||
| export const logs: OnboardingConfig = { | ||
| install: () => [ | ||
| { | ||
| type: StepType.INSTALL, | ||
| content: [ | ||
| { | ||
| type: 'text', | ||
| text: tct( | ||
| 'Logs in .NET are supported in Sentry .NET SDK version [code:5.14.0] and above.', | ||
| { | ||
| code: <code />, | ||
| } | ||
| ), | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| configure: (params: Params) => [ | ||
| { | ||
| type: StepType.CONFIGURE, | ||
| content: [ | ||
| { | ||
| type: 'text', | ||
| text: tct( | ||
| 'To enable logging, you need to initialize the SDK with the [code:Experimental.EnableLogs] option set to [code:true].', | ||
| { | ||
| code: <code />, | ||
| } | ||
| ), | ||
| }, | ||
| { | ||
| type: 'code', | ||
| language: 'csharp', | ||
| code: `SentrySdk.Init(options => | ||
| { | ||
| options.Dsn = "${params.dsn.public}"; | ||
| // Enable logs to be sent to Sentry | ||
| options.Experimental.EnableLogs = true; | ||
| });`, | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| verify: () => [ | ||
| { | ||
| type: StepType.VERIFY, | ||
| content: [ | ||
| { | ||
| type: 'text', | ||
| text: t( | ||
| 'Once the feature is enabled on the SDK and the SDK is initialized, you can send logs using the SentrySdk.Logger APIs.' | ||
| ), | ||
| }, | ||
| { | ||
| type: 'text', | ||
| text: t( | ||
| 'The SentrySdk.Logger instance exposes six methods that you can use to log messages at different log levels: Trace, Debug, Info, Warning, Error, and Fatal.' | ||
| ), | ||
| }, | ||
| { | ||
| type: 'code', | ||
| language: 'csharp', | ||
| code: `SentrySdk.Logger.LogInfo("A simple log message"); | ||
| SentrySdk.Logger.LogError("A {0} log message", "formatted");`, | ||
| }, | ||
| { | ||
| type: 'text', | ||
| text: tct( | ||
| 'You can also attach custom attributes via a delegate. For more information, see the [link:Integrations documentation].', | ||
| { | ||
| link: ( | ||
| <ExternalLink href="https://docs.sentry.io/platforms/dotnet/logs/#integrations" /> | ||
| ), | ||
| } | ||
| ), | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,13 @@ | ||
| import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types'; | ||
| import {CrashReportWebApiOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding'; | ||
|
|
||
| import {logs} from './logs'; | ||
| import {onboarding} from './onboarding'; | ||
|
|
||
| const docs: Docs = { | ||
| onboarding, | ||
| crashReportOnboarding: CrashReportWebApiOnboarding, | ||
| logsOnboarding: logs, | ||
| }; | ||
|
|
||
| export default docs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| import {ExternalLink} from 'sentry/components/core/link'; | ||
| import type { | ||
| DocsParams, | ||
| OnboardingConfig, | ||
| } from 'sentry/components/onboarding/gettingStartedDoc/types'; | ||
| import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types'; | ||
| import {tct} from 'sentry/locale'; | ||
|
|
||
| type Params = DocsParams; | ||
|
|
||
| export const logs: OnboardingConfig = { | ||
| install: () => [ | ||
| { | ||
| type: StepType.INSTALL, | ||
| content: [ | ||
| { | ||
| type: 'text', | ||
| text: tct( | ||
| 'Logs in Native are supported in Sentry Native SDK version [link:0.11.1] and above.', | ||
| { | ||
| link: ( | ||
| <ExternalLink href="https://github.com/getsentry/sentry-native/releases/tag/0.11.1" /> | ||
| ), | ||
| } | ||
| ), | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| configure: (params: Params) => [ | ||
| { | ||
| type: StepType.CONFIGURE, | ||
| content: [ | ||
| { | ||
| type: 'text', | ||
| text: tct( | ||
| 'To enable logging, you need to initialize the SDK with the [code:enable_logs] option set to [code:true].', | ||
| { | ||
| code: <code />, | ||
| } | ||
| ), | ||
| }, | ||
| { | ||
| type: 'code', | ||
| language: 'c', | ||
| code: `sentry_options_t *options = sentry_options_new(); | ||
| sentry_options_set_dsn(options, "${params.dsn.public}"); | ||
| sentry_options_set_enable_logs(options, 1); | ||
| // set other options | ||
| sentry_init(options);`, | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| verify: () => [ | ||
| { | ||
| type: StepType.VERIFY, | ||
| content: [ | ||
| { | ||
| type: 'text', | ||
| text: tct( | ||
| 'Once the feature is enabled on the SDK and the SDK is initialized, you can send logs using the [code:sentry_log_X()] APIs.', | ||
| { | ||
| code: <code />, | ||
| } | ||
| ), | ||
| }, | ||
| { | ||
| type: 'text', | ||
| text: tct( | ||
| 'The API exposes six methods that you can use to log messages at different log levels: [code:trace], [code:debug], [code:info], [code:warn], [code:error], and [code:fatal].', | ||
| { | ||
| code: <code />, | ||
| } | ||
| ), | ||
| }, | ||
| { | ||
| type: 'code', | ||
| language: 'c', | ||
| code: `sentry_log_info("A simple log message"); | ||
| sentry_log_error("A %s log message", "formatted");`, | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 noticed that we have several references to these platforms in the codebase, but we don’t present them as options when users create a project. My understanding is that users can also create projects through the public API - Is that why we need to include these platforms here?