Skip to content

ref(mcp): Drop send_default_pii support - #7747

Merged
alexander-alderman-webb merged 3 commits into
major/3.0from
webb/mcp/drop-send-default-pii
Sep 29, 2026
Merged

alexander-alderman-webb merged 3 commits into
major/3.0from
webb/mcp/drop-send-default-pii

Conversation

@alexander-alderman-webb

Copy link
Copy Markdown
Collaborator

Remove send_default_pii branches from the integration.

Add the data_collection option to all tests for the integration, with gen_ai options enabled if send_default_pii was True, and gen_ai options disabled if send_default_pii was False. When send_default_pii was previously not supplied to sentry_init(), provide data_collection={}.

Split tests that were parametrized on send_default_pii into two non-parametrized tests, with gen_ai options enabled and disabled (the latter suffixed with _no_sensitive_data).

Remove data collection specific tests, as existing tests now exercise the same code paths.

Closes #7600

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ 57650 passed | ❌ 2 failed | ⏭️ 2729 skipped | Total: 60381 | Pass Rate: 95.48% | Execution Time: 165m 22s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -73350
Passed Tests 📉 -68950
Failed Tests 📈 +2
Skipped Tests 📉 -4402

➕ New Tests (2)

View new tests
  • test_input_attributes_nonstreaming_chat[messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
    • Status: ❌ Failing
  • test_async_transport_rate_limiting_with_concurrency
    • File: tests.test_transport
    • Status: ❌ Failing

❌ Failed Tests

test_input_attributes_nonstreaming_chat[messages0-expected_system_instructions0-expected_input_messages0]

File: tests.integrations.mistral.test_mistral
Suite: py3.10-mistral-v2.6.0
Error: KeyError: 139910814203904

Stack Trace
tests/integrations/mistral/test_mistral.py:389: in test_input_attributes_nonstreaming_chat
    sentry_init(
tests/conftest.py:349: in inner
    client = sentry_sdk.Client(*a, **kw)
sentry_sdk/client.py:278: in __init__
    self._init_impl()
sentry_sdk/client.py:428: in _init_impl
    self.integrations = setup_integrations(
sentry_sdk/integrations/__init__.py:217: in setup_integrations
    for integration_cls in iter_default_integrations(
sentry_sdk/integrations/__init__.py:44: in iter_default_integrations
    yield getattr(import_module(module), cls)
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1050: in _gcd_import
    ???
<frozen importlib._bootstrap>:1024: in _find_and_load
    ???
<frozen importlib._bootstrap>:171: in __enter__
    ???
<frozen importlib._bootstrap>:123: in acquire
    ???
E   KeyError: 139910814203904

test_async_transport_rate_limiting_with_concurrency

File: tests.test_transport
Suite: py3.8-common
Error: AssertionError: assert False is True + where False = _check_disabled('error') + where _check_disabled = <sentry_sdk.transport.AsyncHttpTransport object at 0x7f3c14130fd0>._check_disabled + where <sentry_sdk.transport.AsyncHttpTransport object at 0x7f3c14130fd0> = <sentry_sdk.client._Client object at 0x7f3c141301c0>.transport

Stack Trace
tests/test_transport.py:1037: in test_async_transport_rate_limiting_with_concurrency
    assert client.transport._check_disabled("error") is True
E   AssertionError: assert False is True
E    +  where False = _check_disabled('error')
E    +    where _check_disabled = <sentry_sdk.transport.AsyncHttpTransport object at 0x7f3c14130fd0>._check_disabled
E    +      where <sentry_sdk.transport.AsyncHttpTransport object at 0x7f3c14130fd0> = <sentry_sdk.client._Client object at 0x7f3c141301c0>.transport

✅ Patch coverage is 100.00%. Project has 2068 uncovered lines.
❌ Project coverage is 90.05%. Comparing base (21c9144) to head (15ef777).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/mcp.py 100.00% ⚠️ 5 partials
Coverage diff
@@            Coverage Diff             @@
##        master       #PR       +/-##
==========================================
- Coverage    90.28%    90.05%    -0.23%
==========================================
  Files          195       179       -16
  Lines        26195     20780     -5415
  Branches      9758      7302     -2456
==========================================
+ Hits         23649     18712     -4937
- Misses        2546      2068      -478
- Partials      1483      1213      -270

Generated by Codecov Action

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review September 29, 2026 09:39
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner September 29, 2026 09:39

@sentrivana sentrivana left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please double check the removed data collection tests here too if you haven't yet

@alexander-alderman-webb
alexander-alderman-webb merged commit 797a50c into major/3.0 Sep 29, 2026
143 of 145 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/mcp/drop-send-default-pii branch September 29, 2026 12:15
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