enable instrumentation telemetry#809
Conversation
|
|
||
| from ddtrace import patch | ||
| from ddtrace import __version__ as ddtrace_version | ||
| from ddtrace.internal.telemetry import telemetry_writer |
There was a problem hiding this comment.
I recall that importing the telemetry writer added a bunch of cold start time. Did you happen to check to see what impact it's had this time around?
There was a problem hiding this comment.
I haven't, though the impact is expected to be reduced by the changes from the RFC. Is there a benchmark somewhere in CI that you'd look at to validate this?
There was a problem hiding this comment.
It doesn't look like we have any on this repo, at least none that I can easily find. Is this the only change required to enable instrumentation telemetry? I can get a manual test going.
There was a problem hiding this comment.
Yes I believe it is
|
This PR does increase cold start time by approx 4.79% (see first column in chart below). I deployed a lambda layer from this pr branch and another layer from current on main, then used https://github.com/purple4reina/dd-python-cold-start-testing for testing. It deploys two lambda functions then invokes them with frequent cold starts. Results are sent to dashboard https://ddserverless.datadoghq.com/s/61ba5v0dnxcpd8dm/3gu-sxi-fq2. @emmettbutler you said you're expecting to see some improvements later. Can you point me to that RFC you referenced and the performance gains we're hoping to see?
|
|
@purple4reina here's the ddtrace branch that this PR assumes / depends on for the performance gains: DataDog/dd-trace-py#17661 |
This PR doesn't look like it's going to improve cold start times at all, which is what the benchmarks are showing we need to address. |

This change removes the configuration that disables instrumentation telemetry and replaces it with a single telemetry upload during cold start, per the Instrumentation Telemetry For Serverless RFC.
DataDog/dd-trace-py#17661 makes this change work as described in the Instrumentation Telemetry For Serverless RFC.