Skip to content

Conversation

@NicoHinderling
Copy link
Contributor

@NicoHinderling NicoHinderling commented Nov 20, 2025

basically another case of #103390

similarly, to temporarily get around this logic: https://github.com/getsentry/sentry/blob/master/src/sentry/metrics/middleware.py#L37-L40C23

@NicoHinderling NicoHinderling requested a review from a team as a code owner November 20, 2025 03:39
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 20, 2025
Comment on lines 486 to 491
sample_rate=1.0,
tags={
"project_id": project.id,
"organization_id": org_id,
"project_id_value": project.id,
"organization_id_value": org_id,
"artifact_type": artifact_type_name,
},
Copy link

Choose a reason for hiding this comment

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

Bug: Metric tag organization_id is inconsistently renamed to organization_id_value in src/sentry/preprod/tasks.py compared to similar metrics.
Severity: HIGH | Confidence: High

🔍 Detailed Analysis

The _assemble_preprod_artifact_size_analysis function in src/sentry/preprod/tasks.py renames the organization_id metric tag to organization_id_value. This is inconsistent with the compare.results_e2e metric in src/sentry/preprod/size_analysis/tasks.py, which uses organization_id without the _value suffix. This discrepancy in tag naming across similar metrics within the preprod module could lead to issues for downstream consumers like monitoring dashboards or alerts that expect consistent tag structures.

💡 Suggested Fix

Ensure consistent naming for the organization_id metric tag. Either revert organization_id_value to organization_id in src/sentry/preprod/tasks.py or update existing similar metrics to use organization_id_value.

🤖 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/preprod/tasks.py#L486-L491

Potential issue: The `_assemble_preprod_artifact_size_analysis` function in
`src/sentry/preprod/tasks.py` renames the `organization_id` metric tag to
`organization_id_value`. This is inconsistent with the `compare.results_e2e` metric in
`src/sentry/preprod/size_analysis/tasks.py`, which uses `organization_id` without the
`_value` suffix. This discrepancy in tag naming across similar metrics within the
preprod module could lead to issues for downstream consumers like monitoring dashboards
or alerts that expect consistent tag structures.

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

@NicoHinderling NicoHinderling enabled auto-merge (squash) November 20, 2025 03:43
@NicoHinderling NicoHinderling merged commit b466e29 into master Nov 20, 2025
68 checks passed
@NicoHinderling NicoHinderling deleted the fix-tag-for-size-e2e-timing branch November 20, 2025 04:00
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.

3 participants