Skip to content

Conversation

@vbro
Copy link
Contributor

@vbro vbro commented Oct 24, 2025

For customers with DataCategory.TRANSACTION instead of DataCategory.SPAN in their subscription plan, we want to provide the retention as span in the project config.

@vbro vbro requested a review from a team as a code owner October 24, 2025 18:10
@vbro vbro requested review from a team and phacops October 24, 2025 18:10
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 24, 2025
DataCategory.LOG_BYTE: "log",
DataCategory.TRANSACTION: "span",
DataCategory.SPAN: "span",
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Duplicate Keys Cause Configuration Conflicts

The RETENTIONS_CONFIG_MAPPING maps DataCategory.TRANSACTION and DataCategory.SPAN to the same 'span' key. If both categories are present in retention data, dictionary comprehensions using this mapping will silently overwrite one value with the other. This results in unpredictable retention policies and potentially incorrect configuration sent to Relay.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A customer can have either DataCategory.TRANSACTION or DataCategory.SPAN, but not both.

@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #102095    +/-   ##
=========================================
  Coverage   80.97%    80.97%            
=========================================
  Files        8733      8733            
  Lines      388590    388701   +111     
  Branches    24654     24654            
=========================================
+ Hits       314653    314751    +98     
- Misses      73577     73590    +13     
  Partials      360       360            

@vbro vbro merged commit 6151dae into master Oct 29, 2025
70 checks passed
@vbro vbro deleted the vbro_add_txn_as_span_retention branch October 29, 2025 17:56
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants