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: Deduplicate log entries #4154

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Telemetry: Deduplicate log entries #4154

wants to merge 7 commits into from

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Nov 23, 2024

This PR removes duplicate telemetry logs sent within the same batch (currently 10s). The number of occurrences is captured in the new count field for the Log telemetry event, so we can know how many events were removed as duplicated.

Change log entry

None

@github-actions github-actions bot added the core Involves Datadog core libraries label Nov 23, 2024
@pr-commenter
Copy link

pr-commenter bot commented Nov 23, 2024

Benchmarks

Benchmark execution time: 2024-12-13 22:11:08

Comparing candidate commit 35c01fb in PR branch dedup-logs with baseline commit ef81a2f in branch master.

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

scenario:profiler - sample timeline=false

  • 🟩 throughput [+0.466op/s; +0.491op/s] or [+7.796%; +8.206%]

@marcotc marcotc marked this pull request as ready for review November 26, 2024 01:56
@marcotc marcotc requested a review from a team as a code owner November 26, 2024 01:56
Base automatically changed from disable-env-logs to master December 6, 2024 19:17
Copy link

github-actions bot commented Dec 6, 2024

Thank you for updating Change log entry section 👏

Visited at: 2024-12-13 19:02:47 UTC

@marcotc marcotc added the dev/internal Other internal work that does not need to be included in the changelog label Dec 13, 2024
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Dec 13, 2024

Datadog Report

Branch report: dedup-logs
Commit report: 35c01fb
Test service: dd-trace-rb

✅ 0 Failed, 22116 Passed, 1457 Skipped, 5m 42.69s Total Time

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 98.47716% with 3 lines in your changes missing coverage. Please review.

Project coverage is 97.75%. Comparing base (ef81a2f) to head (35c01fb).

Files with missing lines Patch % Lines
lib/datadog/core/telemetry/event.rb 92.10% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #4154    +/-   ##
========================================
  Coverage   97.75%   97.75%            
========================================
  Files        1355     1355            
  Lines       82007    82192   +185     
  Branches     4207     4217    +10     
========================================
+ Hits        80164    80349   +185     
  Misses       1843     1843            

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

@@ -41,6 +41,18 @@ def to_h
}
end

Copy link
Member Author

Choose a reason for hiding this comment

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

In implementing equality for all the Datadog::Core::Telemetry::Event in event.rb, the Datadog::Core::Telemetry::Metric objects also needed their equality implemented since some events contain metrics, which need to be compared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries dev/internal Other internal work that does not need to be included in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants