-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(crons): Add missing guides + consistency #104274
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
feat(crons): Add missing guides + consistency #104274
Conversation
| CeleryBeatAutoDiscovery, | ||
| CLIUpsertPlatformGuide, | ||
| CurlUpsertPlatformGuide, | ||
| DenoUpsertPlatformGuide, | ||
| DotNetUpsertPlatformGuide, | ||
| ElixirObanPlatformGuide, | ||
| ElixirQuantumPlatformGuide, | ||
| ElixirUpsertPlatformGuide, | ||
| GoUpsertPlatformGuide, | ||
| JavaSpringBootUpsertPlatformGuide, | ||
| JavaUpsertPlatformGuide, | ||
| LaravelUpsertPlatformGuide, | ||
| NestJSUpsertPlatformGuide, | ||
| NextJSUpsertPlatformGuide, | ||
| NodeJsUpsertPlatformGuide, | ||
| PHPUpsertPlatformGuide, | ||
| PythonUpsertPlatformGuide, | ||
| RubyActiveJobPlatformGuide, | ||
| RubyRailsMixinPlatformGuide, | ||
| RubySidekiqAutoPlatformGuide, | ||
| RubySidekiqMixinPlatformGuide, | ||
| RubyUpsertPlatformGuide, | ||
| } from './quickStartEntries'; | ||
| } from './upsertPlatformGuides'; |
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.
These are what we added
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 moved the upsert guides out of here and into upsertPlatformGuides.tsx
| sentry_monitor_check_ins slug: '${slug}', monitor_config: Sentry::Cron::MonitorConfig.from_interval(10, :minute) | ||
| # define the monitor config with a crontab | ||
| sentry_monitor_check_ins slug: '${slug}', monitor_config: Sentry::Cron::MonitorConfig.from_crontab('5 * * * *')`; | ||
| sentry_monitor_check_ins slug: '${slug}', monitor_config: Sentry::Cron::MonitorConfig.from_crontab('*/10 * * * *')`; | ||
|
|
||
| return ( | ||
| <Fragment> | ||
| <div> | ||
| {tct( | ||
| '[installLink:Install and configure] the Sentry Ruby and Rails SDKs (min v5.12.0), then instrument your job with our mixin module:', | ||
| { | ||
| installLink: ( | ||
| <ExternalLink href="https://docs.sentry.io/platforms/ruby/guides/rails/" /> | ||
| ), | ||
| } | ||
| )} | ||
| </div> | ||
| <CodeBlock language="ruby">{mixinCode}</CodeBlock> | ||
| <div>{t('You can pass in optional attributes as follows:')}</div> | ||
| <CodeBlock language="ruby">{customCode}</CodeBlock> | ||
| </Fragment> | ||
| ); | ||
| } | ||
|
|
||
| export function RubySidekiqCronQuickStart(props: QuickStartProps) { | ||
| const {slug} = withDefaultProps(props); | ||
|
|
||
| const mixinCode = `class ExampleJob | ||
| incude Sidekiq::Job | ||
| include Sidekiq::Job | ||
| include Sentry::Cron::MonitorCheckIns | ||
| # slug defaults to the job class name | ||
| sentry_monitor_check_ins slug: '${slug}' | ||
| def perform(*args) | ||
| # do stuff | ||
| end | ||
| end`; | ||
|
|
||
| const customCode = `# define the monitor config with an interval | ||
| sentry_monitor_check_ins slug: '${slug}', monitor_config: Sentry::Cron::MonitorConfig.from_interval(1, :minute) | ||
| sentry_monitor_check_ins slug: '${slug}', monitor_config: Sentry::Cron::MonitorConfig.from_interval(10, :minute) | ||
| # define the monitor config with a crontab | ||
| sentry_monitor_check_ins slug: '${slug}', monitor_config: Sentry::Cron::MonitorConfig.from_crontab('5 * * * *')`; | ||
| sentry_monitor_check_ins slug: '${slug}', monitor_config: Sentry::Cron::MonitorConfig.from_crontab('*/10 * * * *')`; |
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.
Changes for consistency
Fixes NEW-657: Add missing cron upsert onboarding guides