-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix(ARC, networking): improve request settings #19101
Conversation
Datadog ReportBranch report: ✅ |
src/sinks/util/service.rs
Outdated
@@ -166,7 +168,7 @@ const fn default_retry_attempts() -> Option<usize> { | |||
} | |||
|
|||
const fn default_retry_max_duration_secs() -> Option<u64> { | |||
Some(3_600) | |||
Some(60) |
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.
We could reduce even more e.g. 30 seconds.
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.
Yeah I'll change it. I'm in favor of being more aggressive here. Retries are relatively cheap even at a 30 second interval.
src/sinks/datadog/metrics/config.rs
Outdated
#[derive(Clone, Copy, Debug)] | ||
pub struct DatadogMetricsTowerRequestConfigDefaults; | ||
|
||
impl TowerRequestConfigDefaults for DatadogMetricsTowerRequestConfigDefaults { | ||
const RETRY_ATTEMPTS: usize = 5; | ||
} |
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 this a change we actually want to make? It wasn't being applied previously.
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.
Agreed, this change is significant. I would argue for keeping it out for now. I think we need to the ability to route failed events from sinks before we lower the retry count such that it may start dropping data.
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.
Agree with keeping it out. Do we have context on why it should be 5?
@@ -41,9 +42,6 @@ pub const BATCH_DEFAULT_TIMEOUT_SECS: f64 = 10.0; | |||
|
|||
pub const PAYLOAD_LIMIT: usize = 3_200_000; | |||
|
|||
const DEFAULT_REQUEST_RETRY_ATTEMPTS: usize = 5; | |||
const DEFAULT_REQUEST_RETRY_MAX_DURATION_SECS: u64 = 300; |
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.
Opted to remove this and use the new global default value of 30 seconds.
@@ -214,11 +222,7 @@ impl SinkConfig for StackdriverConfig { | |||
.limit_max_bytes(MAX_BATCH_PAYLOAD_SIZE)? | |||
.into_batcher_settings()?; | |||
|
|||
let request_limits = self.request.unwrap_with( | |||
&TowerRequestConfig::default() | |||
.rate_limit_duration_secs(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.
This is the global default value so I removed it.
@@ -98,11 +108,7 @@ impl SinkConfig for StackdriverConfig { | |||
}, | |||
}; | |||
|
|||
let request_limits = self.request.unwrap_with( | |||
&TowerRequestConfig::default() | |||
.rate_limit_duration_secs(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.
This is the global default value so I removed it.
@lukesteensen I did a significant refactoring of this PR to match how we configure batch settings so that the component-specific overrides are propagated to their reference docs. While doing that, I began questioning whether or not the existing default overrides are sensible. They weren't being applied previously... so this may introduce significant changes to the default behavior for particular sinks. |
src/sinks/sematext/metrics.rs
Outdated
pub struct SematextTowerRequestConfigDefaults; | ||
|
||
impl TowerRequestConfigDefaults for SematextTowerRequestConfigDefaults { | ||
const RETRY_ATTEMPTS: usize = 5; |
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'm curious why these sinks have such a lower retry count.
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 suspect it was added to one of the metric sinks and then was copied to the others.
src/sinks/datadog/metrics/config.rs
Outdated
#[derive(Clone, Copy, Debug)] | ||
pub struct DatadogMetricsTowerRequestConfigDefaults; | ||
|
||
impl TowerRequestConfigDefaults for DatadogMetricsTowerRequestConfigDefaults { | ||
const RETRY_ATTEMPTS: usize = 5; | ||
} |
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.
Agree with keeping it out. Do we have context on why it should be 5?
Update on the component-level default overridesAs of today, there are components that override the following config settings:
Our proposal is the following:
|
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.
It seems like there are some default behavior changes here. Do we need/want to add some notes to the upgrade guide?
Also, a bug was fixed that prevented component-level default values from being applied. In particular, this updates the default value | ||
for `request.rate_limit_num` for the following sinks: | ||
|
||
| Sink | Default `request.rate_limit_num` Value | Previous Limit | |
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.
Awesome, thanks!
Regression Detector ResultsRun ID: 0c510cb2-fd14-4384-b940-3c7385a7436d ExplanationA regression test is an integrated performance test for Because a target's optimization goal performance in each experiment will vary somewhat each time it is run, we can only estimate mean differences in optimization goal relative to the baseline target. We express these differences as a percentage change relative to the baseline target, denoted "Δ mean %". These estimates are made to a precision that balances accuracy and cost control. We represent this precision as a 90.00% confidence interval denoted "Δ mean % CI": there is a 90.00% chance that the true value of "Δ mean %" is in that interval. We decide whether a change in performance is a "regression" -- a change worth investigating further -- if both of the following two criteria are true:
The table below, if present, lists those experiments that have experienced a statistically significant change in mean optimization goal performance between baseline and comparison SHAs with 90.00% confidence OR have been detected as newly erratic. Negative values of "Δ mean %" mean that baseline is faster, whereas positive values of "Δ mean %" mean that comparison is faster. Results that do not exhibit more than a ±5.00% change in their mean optimization goal are discarded. An experiment is erratic if its coefficient of variation is greater than 0.1. The abbreviated table will be omitted if no interesting change is observed. No interesting changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%. Fine details of change detection per experiment.
|
* fix(ARC, networking): improve request settings * fix spelling * change defaults * refactor * self-review * clippy * update default overrides * fmt nit * add upgrade guide entry
* fix(ARC, networking): improve request settings * fix spelling * change defaults * refactor * self-review * clippy * update default overrides * fmt nit * add upgrade guide entry
* fix(ARC, networking): improve request settings * fix spelling * change defaults * refactor * self-review * clippy * update default overrides * fmt nit * add upgrade guide entry
fix yaml test config and also format the code fix wrong usage log.get, now all tests are passing Ran cargo vdev fmt Fix reference in to_metrics_metadata in log_to_metric.rs Convert type errors to single error with type. Added test for multiple metrics but it is failing. Additional attempts to get the multiple_metadata_metrics working. fix(playground): fix playground vrl version and link (vectordotdev#19119) * fix(playground): fix playground vrl version and link * Ran cargo vdev fmt * remove redundant line * replace clone() with as_ref() whenever possible * Ran cargo vdev fmt chore(website): Fix commenting step on workflow (vectordotdev#19134) * fix: extra env vars into comment step * fix: add sleep to allow branch to connect * fix: update where branch name and sanitized branch name are used Remove multiple metrics test. chore(ci): Bump bufbuild/buf-setup-action from 1.27.2 to 1.28.0 (vectordotdev#19137) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.27.2 to 1.28.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](bufbuild/buf-setup-action@v1.27.2...v1.28.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): Bump the clap group with 1 update (vectordotdev#19127) Bumps the clap group with 1 update: [clap](https://github.com/clap-rs/clap). - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](clap-rs/clap@v4.4.7...v4.4.8) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch dependency-group: clap ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(releasing): Add known issue for Datadog Metrics sink in v0.34.0 (vectordotdev#19122) * chore(releasing): Add known issue for Datadog Metrics sink in v0.34.0 Ref: vectordotdev#19110 Signed-off-by: Jesse Szwedko <[email protected]> * Update website/cue/reference/releases/0.34.0.cue Co-authored-by: Brett Blue <[email protected]> --------- Signed-off-by: Jesse Szwedko <[email protected]> Co-authored-by: Brett Blue <[email protected]> chore(deps): Bump proptest from 1.3.1 to 1.4.0 (vectordotdev#19131) Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.3.1 to 1.4.0. - [Release notes](https://github.com/proptest-rs/proptest/releases) - [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md) - [Commits](proptest-rs/proptest@v1.3.1...v1.4.0) --- updated-dependencies: - dependency-name: proptest dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(deps): Bump env_logger from 0.10.0 to 0.10.1 (vectordotdev#19130) Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.10.0 to 0.10.1. - [Release notes](https://github.com/rust-cli/env_logger/releases) - [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md) - [Commits](rust-cli/env_logger@v0.10.0...v0.10.1) --- updated-dependencies: - dependency-name: env_logger dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> chore(docs): Add alpha to traces and beta to metrics in descriptions (vectordotdev#19139) add alpha to traces and beta to metrics in descriptions Update README.md (vectordotdev#19142) chore(deps): Bump hdrhistogram from 7.5.2 to 7.5.3 (vectordotdev#19129) Bumps [hdrhistogram](https://github.com/HdrHistogram/HdrHistogram_rust) from 7.5.2 to 7.5.3. - [Release notes](https://github.com/HdrHistogram/HdrHistogram_rust/releases) - [Changelog](https://github.com/HdrHistogram/HdrHistogram_rust/blob/main/CHANGELOG.md) - [Commits](HdrHistogram/HdrHistogram_rust@v7.5.2...v7.5.3) --- updated-dependencies: - dependency-name: hdrhistogram dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> enhancement(file sink, aws_s3 sink, gcp_cloud_storage): configurable filename timezone (vectordotdev#18506) * add TzOffset as File Sink configuration * integrate TzOffset into File Sink * apply tz offset to all log event in render_timestamp. * added TzOffset tests * adding chrono-tz for parsing timezones * rename tz_offset to path_tz. timezones are safer than offsets * update tz_offset references to path_tz * cargo fmt * remove unnecessary commented out code. fmt and generate-component-docs * clippy suggestions and remove TryFrom<&str> - serde handles converting to String * rename Template config option `path_tz` to `timezone` * move `path_tz.rs` to `src/config` preparing for applying the same to `aws_s3` sink for filename timezone * update doc configuration description for path_tz * fix wrong method name * AWS and GCS filename timezone support * remove custom tz config * use VRL's timezone config * pass around SinkContext * use TzOffset to pass down to request builders. VRL's TimeZone can't be hash derived * make key_prefix timezone aware and use Option `or` syntax * move tz to offset conversion codes to sink util * remove empty line * update timezone docs in vector-config * get timezone and convert to offset in one go in FileSink * just pass the sinkconfig directly * vector_common to vector_lib * configurable_component is in vector_lib now * lookup to vector_lib * fix aws s3 integration test. pass the context to build_processor in tests * formatting * add sinkcontext to FileSink in file tests * key_prefix is expected to be a template. no need for into Update documentation Updated documentation to include example enhancement(networking, sinks): add full jitter to retry backoff policy (vectordotdev#19106) * enhancement(networking, sinks): add full jitter to retry backoff policy * fmt * fix tests * add test * fix * force ci fix(file source, kubernetes_logs source, file sink): make file internal metric tag opt-in (vectordotdev#19145) * fix(file source, kubernetes_logs source, file sink): make file internal metric tag opt-in * update cue * fix tests fix(datadog_metrics sink): evaluate series v1 env var at runtime (vectordotdev#19148) fix(datadog_metrics sink): evaluate v1 env var at runtime chore(website): WEB-4247 | Update references from s3 to setup.vector.dev (vectordotdev#19149) feat: update references from s3 to setup.vector.dev fix(ARC, networking): improve request settings (vectordotdev#19101) * fix(ARC, networking): improve request settings * fix spelling * change defaults * refactor * self-review * clippy * update default overrides * fmt nit * add upgrade guide entry Update src/transforms/log_to_metric.rs Co-authored-by: Pavlos Rontidis <[email protected]> Tweak and generate docs Tweak and generate docs Update website/cue/reference/components/transforms/base/log_to_metric.cue Co-authored-by: Heston Hoffman <[email protected]> Update website/cue/reference/components/transforms/base/log_to_metric.cue Co-authored-by: Heston Hoffman <[email protected]> Update website/cue/reference/components/transforms/base/log_to_metric.cue Co-authored-by: Heston Hoffman <[email protected]> Update src/transforms/log_to_metric.rs Co-authored-by: Heston Hoffman <[email protected]> Update src/transforms/log_to_metric.rs Co-authored-by: Heston Hoffman <[email protected]> Update src/transforms/log_to_metric.rs Co-authored-by: Heston Hoffman <[email protected]> Fix styling in example for all_metrics. Minor tweaks to formatting for documentation Fix minor issues with formatting that was causing tests to fail.
* fix(ARC, networking): improve request settings * fix spelling * change defaults * refactor * self-review * clippy * update default overrides * fmt nit * add upgrade guide entry
* fix(ARC, networking): improve request settings * fix spelling * change defaults * refactor * self-review * clippy * update default overrides * fmt nit * add upgrade guide entry
* fix(ARC, networking): improve request settings * fix spelling * change defaults * refactor * self-review * clippy * update default overrides * fmt nit * add upgrade guide entry
* fix(ARC, networking): improve request settings * fix spelling * change defaults * refactor * self-review * clippy * update default overrides * fmt nit * add upgrade guide entry
This does a few things:
default_retry_max_duration_secs
from 1 hour to 30 seconds. 1 hour is way too high for this value. If a downstream goes down, this means that Vector might wait up to an hour before it retries after the downstream service recovers. This will significantly improve Vector's ability to quickly recover after a downstream service failure.TowerRequestConfig
. Particularly, we previously (1) ignored component-level default overrides, using the global default instead and (2) ignored the user-set concurrency value if it equaled the global default (e.g., if a component overrode the default concurrency to benone
and the user specifiedadaptive
, the resulting concurrency setting would benone
).max_concurrency_limit
option toAdaptiveConcurrencySettings
. This provides documentation to the user what the maximum is and allows them to override it as they desire. The lack of visibility here has raised questions in the past.https://datadoghq.atlassian.net/browse/OPW-157