Comments (4)
and how should i verify that the Profiler work well with gevent?
could you please provide a small demo?
from dd-trace-py.
Yes, when using any of the features of ddtrace, it is recommended that ddtrace.auto
is imported as the very first thing when not using the ddtrace-run
command, and especially when using gevent
.
We have an example for the compatibility between ddtrace and gevent in our test suite that is specific to profiling https://github.com/Datadog/dd-trace-py/blob/aa32be7a6d17917199a7da041bb86f62310c7971/tests/profiling/simple_program_gevent.py. The typical sign of issues that can arise when not importing ddtrace.auto
at the right time is the timeout of gevent workers, and/or SSL-related issues in network-based applications.
from dd-trace-py.
from the gevent patch commit a665ffe#diff-35c795a5729666c71a99bc5dabeb4c30cb20608695d22719b73c0fd6701cb338
i saw it most do three things:
- let forksafe run correctly with gevent
- get correct thread name.
- let lock work well both with gevent and threading.
i wonder why we need a lock that prevent concurrency from a gevent coroutine and from a threading.Thread at the same time?
see a665ffe#diff-35c795a5729666c71a99bc5dabeb4c30cb20608695d22719b73c0fd6701cb338L84
from dd-trace-py.
i wonder why we need a lock that prevent concurrency from a gevent coroutine and from a threading.Thread at the same time?
The linked commit is where the DoubleLock
class (which I think is the locking mechanism described in the question) was removed, and that's because we no longer need this double locking with the current approach for the gevent support.
from dd-trace-py.
Related Issues (20)
- patchGevent not work HOT 4
- FastAPI trace root not being carried in context with other spans because of certain dependency HOT 3
- Support celery task shadow name HOT 1
- gevent could not work with ddtrace in pytest HOT 5
- why memory allocation profiler could not get real thread name? HOT 3
- Add `trace_connect` for pymysql HOT 3
- Compatibility Issue with pytest 8.0 Collection Changes HOT 2
- DD_RUNTIME_METRICS_ENABLED environment variable not documented HOT 1
- Setting DD_TRACE_SAMPLING_RULES doesn't sample traces HOT 3
- Got object of type 'dict' instead of a code object during stack unwinding
- Error installing ddtrace 1.18.3 with poetry 1.4.2 HOT 2
- Unable to build package file mapping; TypeError: expected str, bytes or os.PathLike object, not Path HOT 1
- NameError: name 'telemetry' is not defined
- ddtrace versions 2.2.0 and above increase the duration of "django.request" HOT 10
- pytest-xdist + coverage + intelligent test runner does not work HOT 1
- CI Visibility: source code integration file path incorrect when not running tests from repo root
- AttributeError: 'dict' object has no attribute '__name__' HOT 2
- `inspect.formatargspec()` import error for Python 3.12 on AWS Lambda HOT 2
- uWSGI Segmentation Fault HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dd-trace-py.