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

Telemetry: Add environment variable to disable logs #4153

Merged
merged 5 commits into from
Dec 6, 2024
Merged

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Nov 22, 2024

Adds the DD_TELEMETRY_LOG_COLLECTION_ENABLED environment variable to disable telemetry log collection, which is enabled by default.

Also, this PR disables telemetry logs in forked processes, to align telemetry logs with all other telemetry signals, which do not send on forks.

@marcotc marcotc requested a review from a team as a code owner November 22, 2024 23:17
@github-actions github-actions bot added the core Involves Datadog core libraries label Nov 22, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 97.56098% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.76%. Comparing base (7f079c9) to head (f7780e2).

Files with missing lines Patch % Lines
spec/datadog/core/telemetry/component_spec.rb 91.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4153   +/-   ##
=======================================
  Coverage   97.75%   97.76%           
=======================================
  Files        1357     1357           
  Lines       81890    81920   +30     
  Branches     4164     4164           
=======================================
+ Hits        80054    80089   +35     
+ Misses       1836     1831    -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pr-commenter
Copy link

pr-commenter bot commented Nov 23, 2024

Benchmarks

Benchmark execution time: 2024-12-03 19:35:08

Comparing candidate commit f7780e2 in PR branch disable-env-logs with baseline commit 7f079c9 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 31 metrics, 2 unstable metrics.

@ivoanjo
Copy link
Member

ivoanjo commented Nov 25, 2024

Also, this PR disables telemetry logs in forked processes, to align telemetry logs with all other telemetry signals, which do not send on forks.

Interesting -- this was surprising to me. Is the intent here to reduce the amount of data sent?

@marcotc
Copy link
Member Author

marcotc commented Nov 25, 2024

Interesting -- this was surprising to me. Is the intent here to reduce the amount of data sent?

@ivoanjo, yes. It's a cautionary setting in case log generations suddenly starts spamming logs due to unforeseen changes. This toggle was supposed to be here from the start, when we first introduced telemetry logs, in order to have a safer rollout.

@marcotc marcotc enabled auto-merge November 26, 2024 01:52
@marcotc marcotc disabled auto-merge November 29, 2024 20:16
@marcotc marcotc enabled auto-merge November 29, 2024 20:16
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Nov 29, 2024

Datadog Report

Branch report: disable-env-logs
Commit report: f7780e2
Test service: dd-trace-rb

✅ 0 Failed, 22044 Passed, 1458 Skipped, 5m 34.79s Total Time

@marcotc marcotc merged commit 0ccc150 into master Dec 6, 2024
319 checks passed
@marcotc marcotc deleted the disable-env-logs branch December 6, 2024 19:17
@github-actions github-actions bot added this to the 2.8.0 milestone Dec 6, 2024
@ivoanjo ivoanjo mentioned this pull request Dec 10, 2024
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.

6 participants