Skip to content

fix(dynamic-sampling): Rename project_id in logs to avoid built-in column collision#117671

Merged
constantinius merged 1 commit into
masterfrom
constantinius/fix/dynamic-sampling/project-id-log-attribute-collision
Jun 15, 2026
Merged

fix(dynamic-sampling): Rename project_id in logs to avoid built-in column collision#117671
constantinius merged 1 commit into
masterfrom
constantinius/fix/dynamic-sampling/project-id-log-attribute-collision

Conversation

@constantinius

Copy link
Copy Markdown
Contributor

In Sentry Explore Logs, querying project_id resolves to the built-in sentry.project_id column (the DSN project, always 1) instead of the custom attribute set in the log extra dict. 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_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.

…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.
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 15, 2026
@constantinius constantinius requested a review from shellmayr June 15, 2026 13:06
@constantinius constantinius marked this pull request as ready for review June 15, 2026 13:06
@constantinius constantinius requested a review from a team as a code owner June 15, 2026 13:06
@constantinius constantinius merged commit 56d965f into master Jun 15, 2026
65 checks passed
@constantinius constantinius deleted the constantinius/fix/dynamic-sampling/project-id-log-attribute-collision branch June 15, 2026 15:49
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