feat(profiling): Better gevent support by Zylphrex · Pull Request #1822 · getsentry/sentry-python · GitHub
Skip to content

feat(profiling): Better gevent support#1822

Merged
Zylphrex merged 4 commits into
masterfrom
txiao/feat/better-gevent-profiling-support
Jan 17, 2023
Merged

feat(profiling): Better gevent support#1822
Zylphrex merged 4 commits into
masterfrom
txiao/feat/better-gevent-profiling-support

Conversation

@Zylphrex

@Zylphrex Zylphrex commented Jan 5, 2023

Copy link
Copy Markdown
Member

We're missing frames from gevent threads. Using gevent.threadpool.ThreadPool
seems to fix that. The monkey patching gevent does is causing the sampler thread
to run in a greenlet on the same thread as the all other greenlets. So when it
is taking a sample, the sampler is current greenlet thus no useful stacks can be
seen.

@Zylphrex Zylphrex force-pushed the txiao/feat/better-gevent-profiling-support branch 3 times, most recently from a9ffd5b to 6c905d2 Compare January 6, 2023 21:25
Base automatically changed from txiao/ref/remove-sample-buffer-from-profiler to master January 10, 2023 16:11
We're missing frames from gevent threads. Using `gevent.threadpool.ThreadPool`
seems to fix that. The monkey patching gevent does is causing the sampler thread
to run in a greenlet on the same thread as the all other greenlets. So when it
is taking a sample, the sampler is current greenlet thus no useful stacks can be
seen.
@Zylphrex Zylphrex force-pushed the txiao/feat/better-gevent-profiling-support branch from 6c905d2 to 0d5555c Compare January 10, 2023 18:32
@Zylphrex Zylphrex marked this pull request as ready for review January 11, 2023 16:51
@Zylphrex Zylphrex requested review from a team and sl0thentr0py January 11, 2023 16:51
@Zylphrex

Copy link
Copy Markdown
Member Author

@Zylphrex Zylphrex merged commit ffe7737 into master Jan 17, 2023
@Zylphrex Zylphrex deleted the txiao/feat/better-gevent-profiling-support branch January 17, 2023 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants