-
Notifications
You must be signed in to change notification settings - Fork 555
Scope refactoring (merge Hubs and Scopes) #2610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
333 commits
Select commit
Hold shift + click to select a range
b8acdae
Removed old _merge_scopes (lives now in Scope())
antonpirker 3cca8be
Fix
antonpirker af54208
Added some tests
antonpirker 7366818
Added tests
antonpirker 9ad022b
Apply suggestions from code review
antonpirker 699ef78
Fixing stuff
antonpirker 55a9f4f
Improved Client inheritance
antonpirker 09737e1
Removed useless code
antonpirker b150a79
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker 5bb2f56
Fixed threading integration to use new Scopes
antonpirker 8594832
Fixed import
antonpirker 0c47518
Removed useless context copying
antonpirker 01b663a
Fixed import
antonpirker 86fa839
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker 50afa9d
Added more tests
antonpirker c16be2b
Sorted __all__
antonpirker 9115743
Deletion of thread local vars is not possible in older Python
antonpirker 70b3d99
Fixed deletion of thread local var in Python 3.6+
antonpirker 8eeeed3
Merge branch 'master' into feat/new-scopes
antonpirker 9952097
Merge branch 'feat/new-scopes' into new-scopes-add-api
antonpirker 39ceeea
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker a8f98b2
Merge branch 'master' into new-scopes-add-api
antonpirker 059f051
Fixed docstring
antonpirker b027411
Fixed docstring
antonpirker 8c4fddc
Fixed imports
antonpirker 4d884e9
Back to normal delete of context var.
antonpirker 1c1b911
Delete from the underlying __dict__. This is ok according to the docs.
antonpirker abd7c37
deactivated tests to try something
antonpirker 3420b24
enable one test
antonpirker 668a7a4
Enabled more tests
antonpirker 95302bd
Another two tests
antonpirker c54ca92
one gone again
antonpirker efffd01
and testing the other one
antonpirker 81eea9a
Check first test
antonpirker e957fdb
If this is green now, i am back to square one.
antonpirker f2ee7c4
this is weird
antonpirker 8ed4e34
one more test
antonpirker e73d85c
forking more test
antonpirker 1c96e1f
more forking
antonpirker 753620a
Cleanup
antonpirker 0172098
Made ScopeType an enum
antonpirker f82bb36
Improved test asserts
antonpirker 387f433
Fixed typing
antonpirker 59a2aed
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker 4d747d6
Moved _copy_on_write to other PR. Makes more sense there because we c…
antonpirker c4a7cb2
typing
antonpirker 7ee62ba
Some tests for scope forking and copy on write
antonpirker cb27c4c
linting
antonpirker 327fcd3
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker 565fdd8
Reformatting
antonpirker 9ae58ee
reformat
antonpirker 4e9a596
imports
antonpirker 7a22de1
Merge branch 'master' into new-scopes-add-api
antonpirker 0fad961
Added copy on write decorator everywhere
antonpirker e053623
small copy on write fixes
antonpirker 9a9c8b1
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker fca14a3
Update test matrix
antonpirker 3141eaa
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker 046ff44
updated apidocs
antonpirker 041e004
updated apidocs
antonpirker 770e815
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker f2e0c01
Fixed some tests
antonpirker ace228c
formatting
antonpirker ff85ada
Fixed test
antonpirker 9f43dc1
Fixed span creation in asyncio
antonpirker 374592c
Always returning a client (breaking backwards compatibility)
antonpirker ca6fd9d
Fix push scope
antonpirker e3bc7d2
Made client Noneable again (sentry does something fishy with the clie…
antonpirker 3b5085e
Fix backwards compatibility
antonpirker 584dba8
Fixed some test dependencies
antonpirker d07bc6b
Also copy the new _type property
antonpirker 0384bb1
debug output
antonpirker 54e9dc0
reset version name
antonpirker d2dda2d
debug
antonpirker be7f45d
.
antonpirker 0d339eb
cleanup
antonpirker aa1ed5c
Removed useless __init__ function
antonpirker f63dfab
Merge branch 'new-scopes-call-api' of github.com:getsentry/sentry-pyt…
antonpirker e73980c
Make hub cloning and using hub as context manager work
antonpirker aae2b9b
Fixed auto session tracking
antonpirker c5f8a24
cleanup
antonpirker 689ad15
Cleanup
antonpirker 36a1aab
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker d5a3c49
Replaced push_scope with configure_scope
antonpirker 51fe293
Fix push_scope
antonpirker d9456fb
Deactivate one Pyramid test and document why (also added to migration…
antonpirker 954bc70
Fork process for test to not bleed data between tests
antonpirker 5960e8a
Fork processes for otel tests to not bleed data
antonpirker 04eea25
Fix transport test
antonpirker 40e6ea5
capture exception from current scope
antonpirker 137952f
own process for test
antonpirker e0e1738
Deactivated some tests that are not valid anymore
antonpirker ed49a91
Fixed some tests
antonpirker 74fee8d
Fixed some tests
antonpirker 19736b6
Improved tests
antonpirker 4128f8f
Skipping some tests in old pythons
antonpirker daa27d2
Formatting
antonpirker d7a2b17
some linting
antonpirker 47c973e
Merge branch 'master' into new-scopes-add-api
antonpirker d6d51b7
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker d3917e0
formatting
antonpirker d473f15
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker 832c98e
typing
antonpirker ec45fb4
Cleaned up some imports
antonpirker c92a02d
Fixed circular import
antonpirker fd2a775
whitespace
antonpirker bbed204
Fixed AWS Lambda tests
antonpirker 19af46f
Trying something
antonpirker bbfda42
did not work.
antonpirker c19d2de
better test data
antonpirker de33075
Needed to update assert
antonpirker f26f96c
oh
antonpirker 7189e5e
Merge branch 'feature/new-scopes' into new-scopes-add-api
antonpirker cd9f330
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker 4576c72
This should work now as is.
antonpirker 05dd8f3
imports
antonpirker f6cb4ef
Update sentry_sdk/scope.py
antonpirker 89089c3
Update sentry_sdk/tracing_utils.py
antonpirker 72365d4
Renamed NoopClient to NonRecordingClient to be more like otel
antonpirker ae39a43
Added some comments
antonpirker f908fe8
Added the right version number
antonpirker 9247623
Added universal lock and use it when changing the global scope
antonpirker 6be5e5f
Added tests for UniversalLock
antonpirker 3b3537f
Made properties of BaseClient actual properties, not class vars
antonpirker 27522d0
Fixed default value
antonpirker a821b93
Do not call async tests in python 2
antonpirker fcb3f68
Make it run in old python
antonpirker 161a1ac
Make it work with old python
antonpirker b7c0db5
Make api consistent
antonpirker 56b266b
Removed useless universal lock, because locking is not the responsibi…
antonpirker f7f8d42
Apply suggestions from code review
antonpirker 7e76fd1
Explanatory comment
antonpirker ddfa91c
Merge branch 'new-scopes-call-api' of github.com:getsentry/sentry-pyt…
antonpirker 5fb44ad
Removed test because it tests an outdated concept
antonpirker 987bb5c
Not commenting out tests, but skipping them.
antonpirker b57cde6
Prevent infinite recursion by using default options.
antonpirker 90d8d20
Merge branch 'new-scopes-add-api' of github.com:getsentry/sentry-pyth…
antonpirker be14473
Merge branch 'new-scopes-add-api' into new-scopes-call-api
antonpirker 2b8deec
Removed copy_on_write functionality
antonpirker 8590a1f
Updated SentryWSGIMiddleware to use new scope API
antonpirker d651a98
Show me the tests that are failing
antonpirker 3674cca
Made it possible to use custom isolation scope
antonpirker 61c3e44
Made scope context manager accept a scope
antonpirker 26c0374
naming things is hard
antonpirker d4c0ef1
Removed isolate()
antonpirker ac8b14e
Removed test for isolate()
antonpirker 8bbcd26
Fixed capture_event parameters in conftest
antonpirker 9f2a852
Merge branch 'feature/new-scopes' into new-scopes-call-api
antonpirker 78bff37
Removed copy_context to have less code
antonpirker 359627f
better readability
antonpirker 518986c
Cleanup
antonpirker 15f340a
Fixed test
antonpirker 898a4db
apidocs
antonpirker 1a6bc4f
apidocs
antonpirker 82632df
Cleaned up public API
antonpirker 0c14609
Cleanup tests
antonpirker 40b313f
apidocs
antonpirker f1dc99c
apidocs
antonpirker 4934d8f
Added deprecation messages
antonpirker 5139e2d
Updated some tests
antonpirker 3090278
Fixed test
antonpirker e7344a4
Merge branch 'sentry-sdk-2.0' into new-scopes-call-api
antonpirker c46fd50
text fix
antonpirker 15a23bd
Update isolation scope context manager to only to one thing
antonpirker ccc3b4b
formatting
antonpirker ac6dd6f
Revert "formatting"
antonpirker 0ef0cd7
formatting again
antonpirker 840b26f
Move some toplevel apis from hub to scope
antonpirker b2ce761
Moved more top level api to scope
antonpirker 3d6ba08
Fixed clickhouse
antonpirker d5095aa
Fixed capture_event for scope
antonpirker 0927abb
Moved last top level api away from Hub
antonpirker 003e737
Removed deprecation warnings
antonpirker c5a4388
Make threading integration behave like it did before
antonpirker a84ca7d
Removed because threading integration behaves now like before
antonpirker 2515ee4
formatting
antonpirker df2caf7
now it works (tm)
antonpirker 6104f24
Make scope context managers align with JS (and possibly OTel)
antonpirker b1e0913
Merge branch 'sentry-sdk-2.0' into new-scopes-call-api
antonpirker 7b8b075
Updated _context_manage_state to not have Hub
antonpirker 1b9e7a6
More tests
antonpirker d5efe35
Merge branch 'sentry-sdk-2.0' into new-scopes-call-api
antonpirker a07cf91
Remove deprecation warning
antonpirker 458f5e9
Removed last_event_id()
antonpirker b96adae
Merge branch 'sentry-sdk-2.0' into new-scopes-call-api
antonpirker 285e2b9
Propagate isolation and current scope to new thread
antonpirker 7d9c51d
Fixed some tests
antonpirker 6df29bc
Fixed linting
antonpirker 8be874b
Update tests/test_scope.py
antonpirker e556a17
Merge branch 'new-scopes-call-api' of github.com:getsentry/sentry-pyt…
antonpirker ab0b06b
Also merge 'self' into merged data that is sent to Sentry
antonpirker a72eec9
Removed unused scope parameter
antonpirker bbc97cc
Removed maybe unused test forking
antonpirker 1f7cb7e
Skip test instead of deleting it
antonpirker 7b9823e
Be extra safe
antonpirker 8987340
Revert "Removed maybe unused test forking"
antonpirker 4d7d4c3
Transactions and spans live on the current span.
antonpirker 6dfe190
Revert "Transactions and spans live on the current span."
antonpirker 2b7a224
Linting
antonpirker 55a33f2
Fixed celery scope forking
antonpirker 56213c0
Cleanup celery tests
antonpirker 4dbcb46
lint
antonpirker 7e17064
Put the active span on the current scope
antonpirker dbf3694
Removed deprecated parameter from start_span()
antonpirker a842bbe
If spans/transactions are started through the hub, also use the curre…
antonpirker 28b7b6e
Skip test of removed feature
antonpirker f90f87b
Move transactions to current scope
antonpirker 1f2e1b2
Configure scope should return the current scope
antonpirker 41c0f6c
Merge branch 'sentry-sdk-2.0' into new-scopes-call-api
antonpirker ba8cb07
Merge branch 'sentry-sdk-2.0' into new-scopes-call-api
antonpirker e4febed
Making sure the tracing information lives on the current scope
antonpirker 5622978
Update hub to get trace information from current scope
antonpirker 62d792d
transaction is on isolation scope, span on corrent scope.
antonpirker 8c229f7
Fixed some test
antonpirker 4501cba
Fixed tests
antonpirker 1c7c79c
Trace information is on isolation scope
antonpirker 3bc0e1b
Fixed test
antonpirker 357ae7e
Fixed test
antonpirker 70140a6
Fixed celery tests
antonpirker 5d812c3
Fixed some tests
antonpirker aeec6ad
Fixed some tests
antonpirker a4cde41
Loguru tests
antonpirker e72b161
Loguru test
antonpirker 54528f5
Fork current scope for each start_span call
antonpirker f2f93fe
start of explenatory tests
antonpirker 8e4319a
Changes in Hub to make it backwards compatible
antonpirker 45b53fd
forking not necessary
antonpirker b0edd7a
Fixed some tests
antonpirker 38e87b2
Linting
antonpirker b9ff715
Updated metrics to use new scopes
antonpirker 61df6e2
updated django
antonpirker 5c402e4
Updated Flask integration
antonpirker dce7fa9
Updated aiohttp
antonpirker 9e5d3a6
Updated pyramid and quart
antonpirker add216b
Reordered tests because fastapi depends on starlette
antonpirker 0cd543c
Updated test matrix
antonpirker b944738
Updated starlette
antonpirker c432cc0
Updated fastapi
antonpirker 7cf41e7
Updated fastapi
antonpirker e570738
Updated arq
antonpirker e6a5457
Updated celery
antonpirker 1cb2a56
Updated celery, huey and rq
antonpirker 9dfa055
Updated sanic
antonpirker 717abe5
Skip test that tests for old behavior
antonpirker 24b8bb1
Formatting
antonpirker 495fe1f
Merge branch 'sentry-sdk-2.0' into new-scopes-call-api
antonpirker 4b09376
small fix
antonpirker 5a7eec9
Cleanup
antonpirker 0c1f0a7
cleanup
antonpirker 5b598c2
Cleanup
antonpirker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.