ref: bump sentry-protos to 0.17.0#7977
Conversation
Co-Authored-By: phacops <336345+phacops@users.noreply.github.com>
sentry_protos 0.17.0 added TraceItemType::ProcessingError. Map it to "processing_errors" for COGS tracking. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| "sentry-kafka-schemas>=2.1.24", | ||
| "sentry-protos>=0.8.14", | ||
| "sentry-protos>=0.17.0", | ||
| "sentry-redis-tools>=0.5.1", |
There was a problem hiding this comment.
Bug: The _ITEM_TYPE_TO_APP_FEATURE dictionary is missing the new TRACE_ITEM_TYPE_PROCESSING_ERROR variant, causing incorrect COGS attribution for these events.
Severity: MEDIUM
Suggested Fix
Add the missing entry "TRACE_ITEM_TYPE_PROCESSING_ERROR": "processing_errors" to the _ITEM_TYPE_TO_APP_FEATURE dictionary in snuba/querylog/__init__.py. This will ensure the new trace item type is correctly mapped for COGS tracking, aligning the Python code with the corresponding changes in the Rust processor.
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: pyproject.toml#L35
Potential issue: The `_ITEM_TYPE_TO_APP_FEATURE` dictionary in
`snuba/querylog/__init__.py` is missing an entry for the new
`TRACE_ITEM_TYPE_PROCESSING_ERROR` enum variant. When the `_get_eap_app_feature`
function processes a request with this new item type, it fails to find a mapping and
defaults to returning `"null"`. This causes Cost of Goods Sold (COGS) to be recorded
with an incorrect `app_feature` of `"null"` instead of the expected
`"processing_errors"`. This results in silent, incorrect COGS tracking data for this
specific event type within the Events Analytics Platform (EAP) cluster.
Also affects:
snuba/querylog/__init__.py:22~36
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
Fixed in acb1540 — added TRACE_ITEM_TYPE_PROCESSING_ERROR: "processing_errors" to _ITEM_TYPE_TO_APP_FEATURE in snuba/querylog/__init__.py.
— Claude Code
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 24ec1c0. Configure here.
Mirrors the Rust write-path mapping so query-path COGS attribution for the new ProcessingError trace item type lands in "processing_errors" instead of falling back to "null". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Co-Authored-By: phacops 336345+phacops@users.noreply.github.com