Skip to content

ref(hybridcloud): separate out explicit outbox model scheduling - #121993

Open
cvxluo wants to merge 1 commit into
masterfrom
cvxluo/schedule-an-explicit-outbox-model
Open

ref(hybridcloud): separate out explicit outbox model scheduling#121993
cvxluo wants to merge 1 commit into
masterfrom
cvxluo/schedule-an-explicit-outbox-model

Conversation

@cvxluo

@cvxluo cvxluo commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Just moving this func around to support #121985. For the GAL, we'll want to run separate recovery tasks.

Co-authored-by: Claude <noreply@anthropic.com>
@cvxluo
cvxluo marked this pull request as ready for review August 13, 2026 20:01
@cvxluo
cvxluo requested a review from a team as a code owner August 13, 2026 20:01
@cvxluo
cvxluo requested a review from a team August 13, 2026 20:01
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 13, 2026
float(deepest_shard_information[0]["depth"]) if deepest_shard_information else 0.0
)
metrics.gauge(
"deliver_from_outbox.maximum_shard_depth",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The outbox_name metric tag is now lowercase (e.g., sentry.controloutbox), which is a breaking change from the previous capitalized version, affecting existing monitoring and alerts.
Severity: HIGH

Suggested Fix

To maintain backward compatibility for metrics, ensure the outbox_name tag value remains capitalized. Revert to using the outbox_name variable that was previously used, which is derived from the settings and has the correct casing.

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: src/sentry/hybridcloud/tasks/deliver_from_outbox.py#L114

Potential issue: The `outbox_name` tag for metrics was previously derived from
`settings.SENTRY_OUTBOX_MODELS`, resulting in capitalized values like
`"sentry.ControlOutbox"`. The new implementation at this location uses
`outbox_model._meta.label`, which produces lowercase values like
`"sentry.controloutbox"`. This case change is a breaking change for any monitoring,
dashboards, or alerts that filter on the `outbox_name` tag. The change will not raise an
exception but will silently cause existing monitoring queries to fail, breaking
historical continuity and potentially delaying responses to production issues.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant