ref(data_export): Rename array telemetry attrs to unprefixed names - #121485
Merged
Conversation
manessaraj
enabled auto-merge (squash)
August 6, 2026 21:05
gggritso
approved these changes
Aug 6, 2026
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
force-pushed
the
sarajmanes/ref/data-export-array-attr-names
branch
from
August 7, 2026 00:12
caffdb0 to
d0bb360
Compare
Comment on lines
186
to
+187
| "data_export.data_export_id": data_export.id, | ||
| "data_export.csv_headers": csv_headers, | ||
| "csv_headers": csv_headers, |
Contributor
There was a problem hiding this comment.
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.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Emit the two array-valued export telemetry attributes as
csv_headersandblob_offsetsinstead ofdata_export.csv_headersanddata_export.blob_offsets, at both the span-data and structured-log sites. Thedata_export.data_export_idattribute and thedataexport.*log message names are left unchanged.In current naming structure, the ingestion string-ify the arrays.