docs(ruby): Add GoodJob integration documentation#16069
Closed
docs(ruby): Add GoodJob integration documentation#16069
Conversation
Add comprehensive documentation for the sentry-good_job integration, which adds support for GoodJob (a Postgres-based ActiveJob backend). Key sections: - Installation instructions for Rails and non-Rails applications - Configuration options with code examples - Error capture with enriched context - Performance monitoring with execution time and queue latency - Automatic and manual cron monitoring setup - 5 configuration options (report_after_job_retries, report_only_dead_jobs, include_job_arguments, auto_setup_cron_monitoring, logging_enabled) Based on PR: getsentry/sentry-ruby#2751 Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| class DailyReportJob < ApplicationJob | ||
| include Sentry::Cron::MonitorCheckIns | ||
|
|
||
| sentry_cron_monitor :daily_reports, |
There was a problem hiding this comment.
Bug: The documentation for GoodJob cron monitoring uses sentry_cron_monitor, but the correct method in the Sentry Ruby SDK is sentry_monitor_check_ins, which will cause a NoMethodError.
Severity: CRITICAL
Suggested Fix
Replace the incorrect sentry_cron_monitor method call with the standard sentry_monitor_check_ins. Update the parameters to match the correct format, using monitor_config: Sentry::Cron::MonitorConfig.from_crontab(...). For example: sentry_monitor_check_ins monitor_config: Sentry::Cron::MonitorConfig.from_crontab('0 9 * * *', timezone: 'America/New_York').
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: docs/platforms/ruby/guides/good_job/index.mdx#L140
Potential issue: The code example for setting up cron monitoring with GoodJob uses the
method `sentry_cron_monitor`. This method does not appear to exist in the Sentry Ruby
SDK, where the standard method is `sentry_monitor_check_ins`. Users copying the provided
example will likely encounter a `NoMethodError` when their application loads the job
class, as the `sentry_cron_monitor` method is undefined. The parameter structure shown
in the example is also inconsistent with the standard SDK usage, which uses
`Sentry::Cron::MonitorConfig.from_crontab`.
Did we get this right? 👍 / 👎 to inform future reviews.
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Adds comprehensive user-facing documentation for the new
sentry-good_jobintegration, which adds support for GoodJob (a Postgres-based ActiveJob backend for Ruby on Rails).Features Documented
report_after_job_retries,report_only_dead_jobs)sentry_cron_monitormethodConfiguration Options
Documents 5 configuration options:
report_after_job_retries(default: false)report_only_dead_jobs(default: false)include_job_arguments(default: false, with security considerations)auto_setup_cron_monitoring(default: true)logging_enabled(default: false)Related SDK PR
Based on: getsentry/sentry-ruby#2751
Documentation Structure
docs/platforms/ruby/guides/good_job/index.mdxdocs/platforms/ruby/common/integrations/index.mdx<Alert>,<SdkOption>)Supported Versions
🤖 Generated with Claude Code