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

Allow trace flush interval to be configurable #5435

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

randomanderson
Copy link
Contributor

@randomanderson randomanderson commented Jun 20, 2023

What Does This Do

Adds the ability to configure the flush interval used to flush traces to the backend.

Motivation

Logs injection smoke tests take too long with dynamic config enabled.

Additional Notes

  • The unit for frequency would be flushes/per second . "Interval" is the correct when talking about durations. I updated where applicable.

  • Almost all of the configurations for intervals use seconds without specifying "seconds" in the config name. I followed that pattern. Internally, milliseconds is used because passing the timeunit through all of those layers would be annoying.

  • Lots of tests and smoke tests can be sped up by configuring a shorter flush interval. I did not make any of those changes in this PR.

@randomanderson randomanderson requested a review from a team as a code owner June 20, 2023 17:26
@pr-commenter
Copy link

pr-commenter bot commented Jun 20, 2023

Benchmarks

Parameters

Baseline Candidate
commit 1.17.0-SNAPSHOT~4684bd066e 1.17.0-SNAPSHOT~8e782e1363
config baseline candidate
See matching parameters
Baseline Candidate
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 22 cases.

Copy link
Contributor

@ygree ygree left a comment

Choose a reason for hiding this comment

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

LGTM

@randomanderson randomanderson enabled auto-merge (squash) June 20, 2023 18:03
@randomanderson randomanderson merged commit e1c159c into master Jun 20, 2023
@randomanderson randomanderson deleted the landerson/configurable-trace-flush-interval branch June 20, 2023 18:22
@github-actions github-actions bot added this to the 1.17.0 milestone Jun 20, 2023
@@ -35,7 +35,7 @@ public static class DDAgentWriterBuilder {
long timeoutMillis = TimeUnit.SECONDS.toMillis(DEFAULT_AGENT_TIMEOUT);
int traceBufferSize = BUFFER_SIZE;
HealthMetrics healthMetrics = HealthMetrics.NO_OP;
int flushFrequencySeconds = 1;
int flushIntervalMilliseconds = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not TimeUnit.SECONDS.toMillis(DEFAULT_TRACE_FLUSH_INTERVAL);?

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

Successfully merging this pull request may close these issues.

3 participants