Skip to content

Commit 98d9807

Browse files
mergify[bot]Julien Danjou
andauthored
fix(profiling): set back the default timeout to 10 seconds (#2362) (#2373)
As the agent does no buffering, 2 seconds is too little for the profiling backend. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Gabriele N. Tornetta <[email protected]> (cherry picked from commit 7f81708) Co-authored-by: Julien Danjou <[email protected]>
1 parent 340f8d4 commit 98d9807

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ddtrace/profiling/exporter/http.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ class PprofHTTPExporter(pprof.PprofExporter):
3939

4040
endpoint = attr.ib()
4141
api_key = attr.ib(default=None)
42-
timeout = attr.ib(factory=attr_utils.from_env("DD_PROFILING_API_TIMEOUT", agent.DEFAULT_TIMEOUT, float), type=float)
42+
# Do not use the default agent timeout: it is too short, the agent is just a unbuffered proxy and the profiling
43+
# backend is not as fast as the tracer one.
44+
timeout = attr.ib(factory=attr_utils.from_env("DD_PROFILING_API_TIMEOUT", 10.0, float), type=float)
4345
service = attr.ib(default=None)
4446
env = attr.ib(default=None)
4547
version = attr.ib(default=None)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
The default agent timeout for profiling has been restored from 2 to 10
5+
seconds to avoid too many profiles from being dropped.

0 commit comments

Comments
 (0)