11import { ExternalLink } from 'sentry/components/core/link' ;
22import type {
3- Docs ,
43 DocsParams ,
54 OnboardingConfig ,
65} from 'sentry/components/onboarding/gettingStartedDoc/types' ;
76import { StepType } from 'sentry/components/onboarding/gettingStartedDoc/types' ;
8- import { agentMonitoring } from 'sentry/gettingStartedDocs/python/python/agentMonitoring' ;
9- import { crashReport } from 'sentry/gettingStartedDocs/python/python/crashReport' ;
10- import { logs } from 'sentry/gettingStartedDocs/python/python/logs' ;
11- import {
12- alternativeProfiling ,
13- profiling ,
14- } from 'sentry/gettingStartedDocs/python/python/profiling' ;
7+ import { alternativeProfiling } from 'sentry/gettingStartedDocs/python/python/profiling' ;
158import { getPythonInstallCodeBlock } from 'sentry/gettingStartedDocs/python/python/utils' ;
169import { t , tct } from 'sentry/locale' ;
1710
18- type Params = DocsParams ;
19-
20- const getInitCallSnippet = ( params : Params ) => `
11+ const getInitCallSnippet = ( params : DocsParams ) => `
2112sentry_sdk.init(
2213 dsn="${ params . dsn . public } ",
2314 # Add data like request headers and IP for users,
@@ -57,7 +48,7 @@ sentry_sdk.init(
5748)
5849` ;
5950
60- const getSdkSetupSnippet = ( params : Params ) => `
51+ const getSdkSetupSnippet = ( params : DocsParams ) => `
6152import sentry_sdk
6253
6354${ getInitCallSnippet ( params ) } `;
@@ -72,13 +63,13 @@ def hello(name):
7263 1/0 # raises an error
7364 return "Hello %s!" % name` ;
7465
75- const getWorkerSetupSnippet = ( params : Params ) => `
66+ const getWorkerSetupSnippet = ( params : DocsParams ) => `
7667import sentry_sdk
7768
7869# Sentry configuration for RQ worker processes
7970${ getInitCallSnippet ( params ) } `;
8071
81- const getMainPythonScriptSetupSnippet = ( params : Params ) => `
72+ const getMainPythonScriptSetupSnippet = ( params : DocsParams ) => `
8273from redis import Redis
8374from rq import Queue
8475
@@ -94,7 +85,7 @@ q = Queue(connection=Redis())
9485with sentry_sdk.start_transaction(name="testing_sentry"):
9586 result = q.enqueue(hello, "World")` ;
9687
97- const onboarding : OnboardingConfig = {
88+ export const onboarding : OnboardingConfig = {
9889 introduction : ( ) =>
9990 tct ( 'The RQ integration adds support for the [link:RQ Job Queue System].' , {
10091 link : < ExternalLink href = "https://python-rq.org/" /> ,
@@ -113,7 +104,7 @@ const onboarding: OnboardingConfig = {
113104 ] ,
114105 } ,
115106 ] ,
116- configure : ( params : Params ) => [
107+ configure : ( params : DocsParams ) => [
117108 {
118109 type : StepType . CONFIGURE ,
119110 content : [
@@ -242,15 +233,3 @@ const onboarding: OnboardingConfig = {
242233 } ,
243234 ] ,
244235} ;
245-
246- const docs : Docs = {
247- onboarding,
248- profilingOnboarding : profiling ( { basePackage : 'sentry-sdk[rq]' } ) ,
249- crashReportOnboarding : crashReport ,
250- agentMonitoringOnboarding : agentMonitoring ,
251- logsOnboarding : logs ( {
252- packageName : 'sentry-sdk[rq]' ,
253- } ) ,
254- } ;
255-
256- export default docs ;
0 commit comments