Skip to content

refactored span stack and added contextvars as alternative for threadlocals #291

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

Closed
wants to merge 2 commits into from

Conversation

beniwohli
Copy link
Contributor

this is a partial "import" of the asyncio work done in #252, sans the
asyncio specific extensions

This implements the v2 API. The largest change is that the queue moved
from `TransactionStore` to `Transport`, and that instead of queuing
Python objects, it queues (by default compressed) lines of JSON.

Another large conceptual change is that events (errors, transactions and
spans) are immediately queued when they are finished.

Architecturally, `elasticapm.base.Client` does only have one single
method to interact with the transport layer, `queue()`, which in turn
calls the transports `queue` method. `send`, `send_remote`, `encode`
etc. are all removed.
…locals

this is a partial "import" of the asyncio work done in elastic#252, sans the
asyncio specific extensions
beniwohli added a commit that referenced this pull request Sep 20, 2018
…locals (#291)

this is a partial "import" of the asyncio work done in #252, sans the
asyncio specific extensions

closes #291
@beniwohli
Copy link
Contributor Author

Merged into 4.x branch

Copy link
Member

@graphaelli graphaelli left a comment

Choose a reason for hiding this comment

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

lgtm


thread_local = threading.local()
thread_local.transaction = None
elasticapm_span_var = None
Copy link
Member

Choose a reason for hiding this comment

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

looks unused

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