Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Telemetry and Remote Configuration in development environments #3039

Merged
merged 5 commits into from
Aug 11, 2023

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Aug 9, 2023

What does this PR do?

By default, it disables the Telemetry and Remote Configuration background workers, which can send HTTP requests, in any environment that is detected as a development environment. See #3036 for the information about the detection logic.

Motivation

Fixes #2823

ddtrace can cause the test suite for the application to fail when ddtrace sends unexpected HTTP requests in the background. These requests are rarely desired and only cause noise add overhead.

Additional Notes

It's still possible to enable these features in a development environment by using their respective environment variables.

How to test the change?

Without the agent running, run any project's test suite with ddtrace enabled and noticed that there's no warning about Telemetry or Remote Configuration not reaching the agent (because their background workers are not running at all).

The same is true for an irb or pry environment.

@marcotc marcotc requested a review from a team August 9, 2023 23:14
@marcotc marcotc self-assigned this Aug 9, 2023
@github-actions github-actions bot added the core Involves Datadog core libraries label Aug 9, 2023
@marcotc
Copy link
Member Author

marcotc commented Aug 9, 2023

@delner, do you think we should also set DD_TRACE_ENABLED to false by default in development environments?

Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more specs need to be adjusted, but I really like the approach!

@TonyCTHsu TonyCTHsu added this to the 1.13.1 milestone Aug 10, 2023
Base automatically changed from non-monitor-detection to master August 10, 2023 17:25
Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New telemetry and remote config features breaking webmock-enabled tests
3 participants