Skip to content
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

Patch gevent to work with tracing #1028

Merged
merged 8 commits into from
Dec 3, 2024
Merged

Patch gevent to work with tracing #1028

merged 8 commits into from
Dec 3, 2024

Conversation

trevorriles
Copy link
Contributor

@trevorriles trevorriles commented Nov 27, 2024

Instrument gevent so that it passes opentelemetry context to greenlets. We already have a similar implementation deployed to reddit's internal graphql service. After receiving a bug report from other services missing trace context propagation the fix is being move into baseplate.py.

I've verified that this fix resolves an issue where log lines inside of a greenlet were missing the tracing info.

Trevor Riles added 6 commits November 27, 2024 13:10
This resolves an issue where some logs are missing the tracing info when
running on different greenlets, this is also already used in graphql.py
to ensure client requests have the correct context when running on
different greenlets.
We initate the patch when baseplate-serve is called. I've add a very
simple test that shows that the parent relationship is correct when
patched but incorrect when unpatched.
@trevorriles trevorriles marked this pull request as ready for review December 2, 2024 16:19
@trevorriles trevorriles requested a review from a team as a code owner December 2, 2024 16:19
baseplate/lib/tracing.py Outdated Show resolved Hide resolved
baseplate/lib/tracing.py Outdated Show resolved Hide resolved
baseplate/lib/tracing.py Outdated Show resolved Hide resolved
@chriskuehl chriskuehl merged commit 6a6cced into develop Dec 3, 2024
4 checks passed
@chriskuehl chriskuehl deleted the push-vtrvssqptxrl branch December 3, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants