Skip to content

Conversation

@armenzg
Copy link
Member

@armenzg armenzg commented Oct 27, 2025

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 27, 2025
"internal.sdk_transport_error",
tags={"transport": "upstream", "error_type": "ConnectionError"},
sample_rate=1.0,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Mismatched Sample Rate Causes Test Failure

The test_transport_error_tracking test expects metrics.incr to be called with sample_rate=1.0 for the internal.sdk_transport_error metric. The patch_transport_for_instrumentation function, however, retrieves this sample rate from options.get("sdk_transport_error.sample-rate"), which defaults to 0.0. This mismatch causes the test to fail.

Fix in Cursor Fix in Web

@codecov
Copy link

codecov bot commented Oct 27, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
41410 1 41409 250
View the top 1 failed test(s) by shortest run time
tests.sentry.utils.test_sdk.PatchTransportForInstrumentationTest::test_transport_error_tracking
Stack Traces | 0.108s run time
#x1B[1m#x1B[.../sentry/utils/test_sdk.py#x1B[0m:572: in test_transport_error_tracking
    mock_metrics.incr.assert_any_call(
#x1B[1m#x1B[.../hostedtoolcache/Python/3.13.1.../x64/lib/python3.13/unittest/mock.py#x1B[0m:1048: in assert_any_call
    raise AssertionError(
#x1B[1m#x1B[31mE   AssertionError: incr('internal.sdk_transport_error', tags={'transport': 'upstream', 'error_type': 'ConnectionError'}, sample_rate=1.0) call not found#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@getsantry
Copy link
Contributor

getsantry bot commented Nov 18, 2025

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Nov 18, 2025
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 Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants