-
Notifications
You must be signed in to change notification settings - Fork 386
DEBUG-3700 Telemetry integration test #4588
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
base: master
Are you sure you want to change the base?
Conversation
f4ba5a2
to
c67d2b3
Compare
BenchmarksBenchmark execution time: 2025-04-23 18:03:40 Comparing candidate commit d1e9ac4 in PR branch Found 3 performance improvements and 0 performance regressions! Performance is the same for 28 metrics, 2 unstable metrics. scenario:tracing - 100 span trace - no writer
scenario:tracing - Propagation - Datadog
scenario:tracing - Tracing.log_correlation
|
Datadog ReportBranch report: ❌ 2 Failed (0 Known Flaky), 20477 Passed, 1363 Skipped, 3m 45.36s Total Time ❌ Failed Tests (2)
|
9cc84c0
to
d1e9ac4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have few questions about new code and few suggestions about the tests
it 'sends expected payload' do | ||
component.error('test error') | ||
|
||
sleep 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a way for us to force flush instead of sleeping? Sleeping could be flaky
|
||
let(:sent_payloads) { [] } | ||
|
||
shared_examples 'telemetry' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find shared examples are tedious to debug and also to read the test and personally I'm against such DRY for the sake of DRY. But not a blocker
P.S Yes, I would prefer copy-paste here, more obvious is better.
end | ||
end | ||
|
||
context 'agentful' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor note here, I think a description in a way of sentence would be great adjustment, like
context 'when setup is using standard agent mode' do
or so
@@ -0,0 +1,191 @@ | |||
require 'spec_helper' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require 'spec_helper' | |
# frozen_string_literal: true | |
require 'spec_helper' |
@@ -47,6 +47,14 @@ def terminate | |||
@run_async = false | |||
Datadog.logger.debug { "Forcibly terminating worker thread for: #{self}" } | |||
worker.terminate | |||
# Wait for the worker thread to end | |||
begin | |||
Timeout.timeout(0.5) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have few questions here.
- We wait some time and fail with exception, and then continue as always, but what's the difference? The debug log?
- Why don't we check is worker running instead of waiting till complete? Just to avoid sleep?
What does this PR do?
Adds integration tests for agent and agentless telemetry
Motivation:
Test coverage for upcoming code changes to the core transport within telemetry
Change log entry
None
Additional Notes:
I added a wait to the termination code for async worker, without it the workers were not terminated within the test's scope and the thread leak checker was complaining
How to test the change?
PR is tests only