Skip to content

feat(data_collection): Support KeyValueCollectionBehaviour for stack_frame_variables - #7265

Merged
ericapisani merged 4 commits into
masterfrom
py-2578-stack-frame-vars
Aug 27, 2026
Merged

feat(data_collection): Support KeyValueCollectionBehaviour for stack_frame_variables#7265
ericapisani merged 4 commits into
masterfrom
py-2578-stack-frame-vars

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Allow stack_frame_variables to accept an allowlist/denylist dict (like other data_collection options) in addition to a plain bool. Explicit data_collection config now ignores the legacy include_local_variables option instead of falling back to it, and frame_context_lines validates its value and raises on invalid input.

Refs PY-2578
Refs #6738

Frame source context (pre/post/context lines) now honours the
data_collection experimental option's frame_context_lines setting when
enabled, overriding both the default of 5 lines and the legacy
include_source_context flag.

Refs PY-2578
Refs #6738
…frame_variables

Allow `stack_frame_variables` to accept an allowlist/denylist dict
(like other data_collection options) in addition to a plain bool.
Explicit `data_collection` config now ignores the legacy
`include_local_variables` option instead of falling back to it, and
`frame_context_lines` validates its value and raises on invalid input.

Refs PY-2578
Refs #6738
@ericapisani
ericapisani requested a review from a team as a code owner August 26, 2026 19:23
@linear-code

linear-code Bot commented Aug 26, 2026

Copy link
Copy Markdown

PY-2578

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit dc5822c. Configure here.

Comment thread sentry_sdk/data_collection.py
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

118640 passed | ⏭️ 6732 skipped | Total: 125372 | Pass Rate: 94.63% | Execution Time: 421m 32s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +3658
Passed Tests 📈 +3661
Failed Tests 📉 -3
Skipped Tests

➖ Removed Tests (2)

View removed tests
  • test_binary_content_encoding_image_url[True-False]
    • File: tests.integrations.litellm.test_litellm
  • test_cache_spans_item_size[True]
    • File: tests.integrations.django.test_cache_module

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2486 uncovered lines.
✅ Project coverage is 90.24%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.24%    90.24%        —%
==========================================
  Files          193       193         —
  Lines        25480     25483        +3
  Branches      9382      9384        +2
==========================================
+ Hits         22994     22997        +3
- Misses        2486      2486         —
- Partials      1431      1430        -1

Generated by Codecov Action

Base automatically changed from py-2578-frame-context-lines to master August 27, 2026 11:59
@ericapisani
ericapisani enabled auto-merge (squash) August 27, 2026 12:04
@ericapisani
ericapisani merged commit 05b284e into master Aug 27, 2026
139 checks passed
@ericapisani
ericapisani deleted the py-2578-stack-frame-vars branch August 27, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants