feat(ddtrace): disable telemetry collection by default #260
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Disables
ddtraceinstrumentation telemetry data collection by setting the following environment variable:DD_INSTRUMENTATION_TELEMETRY_ENABLED=True. This change is required to useddtrace>=1.5in serverless environments to fix a performance regression in cold starts.Where this feature is enabled in the ddtrace library: https://github.com/DataDog/dd-trace-py/blob/v1.5.3/ddtrace/internal/writer.py#L514
Motivation
Instrumentation Telemetry is designed to collect, transform and visualize usage, diagnostics and onboarding data for the various APM client libraries (tracer/profiler/debugger/appsec/etc.). The data collected and sent to the datadog backend contains information about an application (dependencies, traced libraries, python versions and implementations, etc.), host/environment data (os, hostname, kernel, container id, etc.) and ddtrace configurations. Collecting this data in lambda functions can increase cold starts by up to 2 seconds and the overhead of the tracer (initial tests show a 5-10% increase but this needs further verification).
Note - Enabling instrumentation telemetry is required for application security products.
Testing
Use the changes in this branch and
ddtrace>=1.5to verify the performance overhead of tracing lambda functions. Test hot and cold starts with the following cases:DD_INSTRUMENTATION_TELEMETRY_ENABLED=False.DD_INSTRUMENTATION_TELEMETRY_ENABLEDis not set.DD_INSTRUMENTATION_TELEMETRY_ENABLED=True.If the results from
case 3are acceptable then this PR should be closed. If the additional overhead is not acceptable then we should move forward with this change.Types of Changes
Check all that apply