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)
- Datadog tracer SqlAlchemy integration exception
- ddtrace.readthedocs.io is stale HOT 4
- DDTraceDeprecationWarning: The 'span' keyword argument on ExecutionContext methods is deprecated HOT 1
- Set service name for boto3/botocore from env var HOT 1
- dd-trace auto-instrumentation not capturing error and stack trace details for HTTP Exception errors in FastAPI HOT 4
- Sample rate feature is not working (at all) HOT 1
- Asynchronous context manager crash with langchain-openai >= 0.1.2 HOT 10
- Upgrading from v2.4.0 to v2.8.1 changes tracking from `trace.django.request` to `trace.django.middleware` HOT 3
- ddtrace breaks Bedrock Cohere Command R models
- grpc integration causes exception with grpc.aio streaming HOT 1
- ModuleWatchdog is installed unconditionally when ddtrace is imported HOT 1
- Elastic Search Quantization not always effective and does not match Datadog agent's
- Segmentation Fault in dd-trace-py on Python 3.12 HOT 3
- OpenAI: TypeError: 'NoneType' object cannot be interpreted as an integer HOT 4
- The gRPC AIO server integration fails to set the gRPC status code for the span HOT 1
- Langchain patch assumes that you have langchain_community installed HOT 3
- Errors parsing DSNs when using both psycopg2 and psycopg
- Feature Request: [LLMObs] Support Automatic spans for `langchain_community`'s tools and retriever. HOT 3
- High CPU utilization causing kubernetes pod scaling with ddtrace > 2.3.0 HOT 2
- Cannot override the `service_name` for the `requests` integration HOT 1
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.