fix(dynamic-sampling): Rename project_id in logs to avoid built-in column collision#117671
Merged
constantinius merged 1 commit intoJun 15, 2026
Conversation
…lision In Sentry Explore Logs, `project_id` resolves to the built-in `sentry.project_id` column (the DSN project, always 1) instead of the custom attribute from the log `extra` dict. This made it impossible to filter or group by the actual dynamic sampling project ID. Rename `project_id` to `dynamic_sampling_project_id` in all three logger.info calls, consistent with what was already done for the metrics tags in 8c290f5. Also switch the debug metrics from gauge to distribution for better aggregation support.
shellmayr
approved these changes
Jun 15, 2026
3 tasks
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.
In Sentry Explore Logs, querying
project_idresolves to the built-insentry.project_idcolumn (the DSN project, always 1) instead of the custom attribute set in the logextradict. This made it impossible to filter or group by the actual dynamic sampling project ID in the project and transaction balancing comparison logs.Rename
project_idtodynamic_sampling_project_idin all threelogger.infocalls, consistent with what was already done for the metrics tags in 8c290f5. Also switch the debug metrics fromgaugetodistributionfor better aggregation support.