Conversation
…debase and also gone in SDK 3.0
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #92011 +/- ##
==========================================
+ Coverage 84.22% 88.00% +3.78%
==========================================
Files 10441 10439 -2
Lines 603621 603584 -37
Branches 23491 23444 -47
==========================================
+ Hits 508384 531177 +22793
+ Misses 94871 71901 -22970
- Partials 366 506 +140 |
requirements-dev-frozen.txt
Outdated
| pytest-metadata==3.1.1 | ||
| pytest-rerunfailures==15.0 | ||
| pytest-sentry==0.3.0 | ||
| pytest-sentry==0.5.0 |
There was a problem hiding this comment.
did you end up fixing the leaky sdk bits in pytest-sentry that were causing the code under test to report to the tests project?
There was a problem hiding this comment.
was sidetracked by ai agents stuff, so this is still on my list.
tests/sentry/ingest/ingest_consumer/test_ingest_consumer_processing.py
Outdated
Show resolved
Hide resolved
tests/sentry/ingest/ingest_consumer/test_ingest_consumer_processing.py
Outdated
Show resolved
Hide resolved
tests/sentry/sentry_apps/api/endpoints/test_sentry_app_installation_external_issues.py
Show resolved
Hide resolved
|
@asottile-sentry do you know if those errors I get ( |
this means some background thread started a database connection in some test (it's pretty hard to actually narrow down). it's likely caused by this PR unfortunately :( |
I think this flake also exists on main. @joshuarli tagged me in a flaky test ticket that had the same issue. |
it's a bit flaky on mainline yeah -- but not to the level it is failing here |
|
only one test is failing now after the |
|
the test failure you see here is present on master, it's currently being debugged |
|
revert failed (conflict? already reverted?) -- check the logs |
|
Reverted because a change in issue grouping introduced by this release backlogged canary. We'll fix this and dogfood again next week. |
Update the codebase so it works with
Sentry Python SDK 3.0.0 alpha.Sentry SDK 3.0.0 has some backwards incompatibilities and uses Opentelementry under the hood to create spans.
What this PR does:
sentry_sdk.start_transaction()withsentry_sdk.start_span()span.set_data()withspan.set_attribute()scope.transactionwithscope.root_spanSpan.containing_transactionwithSpan.root_spancustom_sampling_contextwithattributesparametersentry_sdk.scope.get_*_scope()withsentry_sdk.get_*_scope()scope.add_attachment()withsentry_sdk.add_attachment()continue_trace()to the new context manager.traces_samplerto use newsampling_contextformatSee also the migration guide:
https://docs.sentry.io/platforms/python/migration/2.x-to-3.x
Related, but split out into separate PRs:
traces_samplerworks the same as before (check forsample_rate): test: Add test for custom sample rates #93011get_isolation_scopecalls use the top-level API. Currently, some calls where wefrom sentry_sdk import Scopethen callScope.get_isolation_scopestill need to be converted to the top-level API: Cleanup imports to always use the top level api. #93307event["measurements"]places if those can be removed (because SDK does not support measurements anymore): Remove usage ofmeasurementsin favor ofspan.data. #92718set_span_datatoset_span_attribute#92946with sentry_sdk.init(dsn=...)withwith sentry_sdk.new_scope() as scope: scope.set_client(sentry_sdk.Client(dsn=...))insrc/sentry/runner/main.py: ref: Useset_clientto change DSN #92944propagate_hub=TruefromThreadingIntegration: ref: Removepropagate_hubtoThreadingIntegration#93016devenvforward compatible with Sentry SDK 3.0.0 devenv#194devservicesforward compatible with Python SDK 3.0.0 devservices#277