Skip to content

ref(data_export): Rename array telemetry attrs to unprefixed names - #121485

Merged
manessaraj merged 1 commit into
masterfrom
sarajmanes/ref/data-export-array-attr-names
Aug 7, 2026
Merged

ref(data_export): Rename array telemetry attrs to unprefixed names#121485
manessaraj merged 1 commit into
masterfrom
sarajmanes/ref/data-export-array-attr-names

Conversation

@manessaraj

Copy link
Copy Markdown
Contributor

Emit the two array-valued export telemetry attributes as csv_headers and blob_offsets instead of data_export.csv_headers and data_export.blob_offsets, at both the span-data and structured-log sites. The data_export.data_export_id attribute and the dataexport.* log message names are left unchanged.
In current naming structure, the ingestion string-ify the arrays.

@manessaraj
manessaraj requested a review from a team as a code owner August 6, 2026 21:04
@manessaraj
manessaraj enabled auto-merge (squash) August 6, 2026 21:05
Emit the two array-valued export telemetry attributes as `csv_headers`
and `blob_offsets` instead of `data_export.csv_headers` and
`data_export.blob_offsets`, at both the span-data and structured-log
sites. The `data_export.data_export_id` attribute and the `dataexport.*`
log message names are left unchanged.
In current naming structure, the ingestion strigifies the arrays.
@manessaraj
manessaraj force-pushed the sarajmanes/ref/data-export-array-attr-names branch from caffdb0 to d0bb360 Compare August 7, 2026 00:12
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 7, 2026
Comment on lines 186 to +187
"data_export.data_export_id": data_export.id,
"data_export.csv_headers": csv_headers,
"csv_headers": csv_headers,

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: Tests in test_organization_trace_item_attributes.py assert old span attribute names (data_export.csv_headers, data_export.blob_offsets) while the production code now uses new, unprefixed names, causing test failures.
Severity: MEDIUM

Suggested Fix

Update the assertions in test_organization_trace_item_attributes.py to expect the new, unprefixed attribute names csv_headers and blob_offsets instead of the old data_export.csv_headers and data_export.blob_offsets.

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/data_export/tasks.py#L186-L187

Potential issue: The production code was updated to set span attributes as `csv_headers`
and `blob_offsets` in `export_chunk_to_stored_blobs()` and `merge_export_blobs()`
respectively. However, the corresponding tests in
`test_organization_trace_item_attributes.py` were not updated. These tests still assert
that the attribute names are the old, prefixed versions: `data_export.csv_headers` and
`data_export.blob_offsets`. This mismatch will cause the test suite to fail, preventing
the changes from being validated correctly.

Also affects:

  • src/sentry/data_export/tasks.py:795~796

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

@manessaraj
manessaraj merged commit acfe2bb into master Aug 7, 2026
65 checks passed
@manessaraj
manessaraj deleted the sarajmanes/ref/data-export-array-attr-names branch August 7, 2026 00:22
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.

2 participants