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

enhancement(networking, sinks): add full jitter to retry backoff policy #19106

Merged
merged 6 commits into from
Nov 14, 2023

Conversation

dsmith3197
Copy link
Contributor

@dsmith3197 dsmith3197 commented Nov 9, 2023

Full jitter performs the best according to AWS.

#4724

https://datadoghq.atlassian.net/browse/OPW-158

@dsmith3197 dsmith3197 requested review from a team as code owners November 9, 2023 19:10
@dsmith3197 dsmith3197 requested a review from a team November 9, 2023 19:10
@github-actions github-actions bot added domain: sinks Anything related to the Vector's sinks domain: external docs Anything related to Vector's external, public documentation labels Nov 9, 2023
max_duration: self.max_duration,
logic: self.logic.clone(),
}
}

const fn backoff(&self) -> Duration {
self.current_duration
match self.jitter_mode {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to support the None (no jitter) case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't have to but I don't see a major downside to providing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, also it makes testing significantly easier.

@datadog-vectordotdev
Copy link

datadog-vectordotdev bot commented Nov 9, 2023

Datadog Report

Branch report: dougsmith/jitter-retry-backoff
Commit report: acb95d0

vector: 0 Failed, 0 New Flaky, 2228 Passed, 0 Skipped, 27m 12.55s Wall Time

Copy link
Member

@pront pront left a comment

Choose a reason for hiding this comment

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

👍

@dsmith3197 dsmith3197 force-pushed the dougsmith/jitter-retry-backoff branch from 75a6337 to 27dc688 Compare November 14, 2023 14:17
@dsmith3197 dsmith3197 requested review from a team November 14, 2023 14:17
@bits-bot
Copy link

bits-bot commented Nov 14, 2023

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added domain: topology Anything related to Vector's topology code domain: sources Anything related to the Vector's sources domain: transforms Anything related to Vector's transform components domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: vdev Anything related to the vdev tooling labels Nov 14, 2023
@dsmith3197 dsmith3197 changed the base branch from dougsmith/update-request-settings to master November 14, 2023 14:17
@dsmith3197 dsmith3197 removed the request for review from StephenWakely November 14, 2023 14:25
@github-actions github-actions bot removed domain: topology Anything related to Vector's topology code domain: sources Anything related to the Vector's sources domain: transforms Anything related to Vector's transform components domain: core Anything related to core crates i.e. vector-core, core-common, etc domain: vdev Anything related to the vdev tooling labels Nov 14, 2023
@dsmith3197 dsmith3197 added this pull request to the merge queue Nov 14, 2023
Copy link

Regression Detector Results

Run ID: ce447df1-a5bb-4d6c-bf20-ea65fac4ca26
Baseline: 5a55567
Comparison: c668def
Total vector CPUs: 7

Explanation

A regression test is an integrated performance test for vector in a repeatable rig, with varying configuration for vector. What follows is a statistical summary of a brief vector run for each configuration across SHAs given above. The goal of these tests are to determine quickly if vector performance is changed and to what degree by a pull request.

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:

  1. The estimated |Δ mean %| ≥ 5.00%. This criterion intends to answer the question "Does the estimated change in mean optimization goal performance have a meaningful impact on your customers?". We assume that when |Δ mean %| < 5.00%, the impact on your customers is not meaningful. We also assume that a performance change in optimization goal is worth investigating whether it is an increase or decrease, so long as the magnitude of the change is sufficiently large.

  2. Zero is not in the 90.00% confidence interval "Δ mean % CI" about "Δ mean %". This statement is equivalent to saying that there is at least a 90.00% chance that the mean difference in optimization goal is not zero. This criterion intends to answer the question, "Is there a statistically significant difference in mean optimization goal performance?". It also means there is no more than a 10.00% chance this criterion reports a statistically significant difference when the true difference in mean optimization goal is zero -- a "false positive". We assume you are willing to accept a 10.00% chance of inaccurately detecting a change in performance when no true difference exists.

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.
experiment goal Δ mean % Δ mean % CI confidence
syslog_log2metric_humio_metrics ingress throughput +2.31 [+2.17, +2.44] 100.00%
datadog_agent_remap_blackhole_acks ingress throughput +2.24 [+2.15, +2.32] 100.00%
datadog_agent_remap_blackhole ingress throughput +1.80 [+1.72, +1.89] 100.00%
datadog_agent_remap_datadog_logs ingress throughput +0.90 [+0.80, +1.00] 100.00%
fluent_elasticsearch ingress throughput +0.68 [+0.23, +1.13] 98.70%
splunk_hec_route_s3 ingress throughput +0.67 [+0.16, +1.19] 96.93%
otlp_grpc_to_blackhole ingress throughput +0.30 [+0.20, +0.40] 100.00%
http_to_http_noack ingress throughput +0.13 [+0.03, +0.24] 96.14%
http_to_s3 ingress throughput +0.09 [-0.18, +0.36] 41.09%
datadog_agent_remap_datadog_logs_acks ingress throughput +0.08 [+0.02, +0.15] 95.50%
http_to_http_json ingress throughput +0.01 [-0.06, +0.08] 26.51%
file_to_blackhole egress throughput +0.01 [-2.42, +2.44] 0.57%
splunk_hec_to_splunk_hec_logs_acks ingress throughput -0.00 [-0.15, +0.14] 0.66%
splunk_hec_indexer_ack_blackhole ingress throughput -0.00 [-0.14, +0.14] 1.70%
splunk_hec_to_splunk_hec_logs_noack ingress throughput -0.03 [-0.15, +0.09] 30.41%
enterprise_http_to_http ingress throughput -0.08 [-0.16, +0.01] 85.37%
syslog_splunk_hec_logs ingress throughput -0.44 [-0.48, -0.39] 100.00%
http_elasticsearch ingress throughput -0.49 [-0.55, -0.43] 100.00%
syslog_humio_logs ingress throughput -0.78 [-0.89, -0.68] 100.00%
syslog_log2metric_splunk_hec_metrics ingress throughput -0.96 [-1.08, -0.83] 100.00%
syslog_regex_logs2metric_ddmetrics ingress throughput -1.02 [-1.11, -0.94] 100.00%
syslog_loki ingress throughput -1.09 [-1.15, -1.04] 100.00%
http_text_to_http_json ingress throughput -1.45 [-1.56, -1.33] 100.00%
socket_to_socket_blackhole ingress throughput -2.01 [-2.06, -1.96] 100.00%
http_to_http_acks ingress throughput -2.14 [-3.43, -0.85] 99.35%
otlp_http_to_blackhole ingress throughput -2.24 [-2.39, -2.09] 100.00%

Merged via the queue into master with commit c668def Nov 14, 2023
40 checks passed
@dsmith3197 dsmith3197 deleted the dougsmith/jitter-retry-backoff branch November 14, 2023 19:37
neuronull pushed a commit that referenced this pull request Nov 14, 2023
…cy (#19106)

* enhancement(networking, sinks): add full jitter to retry backoff policy

* fmt

* fix tests

* add test

* fix

* force ci
pront pushed a commit to dygfloyd/vector that referenced this pull request Nov 15, 2023
…cy (vectordotdev#19106)

* enhancement(networking, sinks): add full jitter to retry backoff policy

* fmt

* fix tests

* add test

* fix

* force ci
pront pushed a commit to dygfloyd/vector that referenced this pull request Nov 15, 2023
…cy (vectordotdev#19106)

* enhancement(networking, sinks): add full jitter to retry backoff policy

* fmt

* fix tests

* add test

* fix

* force ci
pront added a commit to dygfloyd/vector that referenced this pull request Nov 15, 2023
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] <support@github.com>
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] <support@github.com>
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 <jesse.szwedko@datadoghq.com>

* Update website/cue/reference/releases/0.34.0.cue

Co-authored-by: Brett Blue <84536271+brett0000FF@users.noreply.github.com>

---------

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
Co-authored-by: Brett Blue <84536271+brett0000FF@users.noreply.github.com>

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] <support@github.com>
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] <support@github.com>
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] <support@github.com>
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 <pavlos.rontidis@gmail.com>

Tweak and generate docs

Tweak and generate docs

Update website/cue/reference/components/transforms/base/log_to_metric.cue

Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>

Update website/cue/reference/components/transforms/base/log_to_metric.cue

Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>

Update website/cue/reference/components/transforms/base/log_to_metric.cue

Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>

Update src/transforms/log_to_metric.rs

Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>

Update src/transforms/log_to_metric.rs

Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>

Update src/transforms/log_to_metric.rs

Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>

Fix styling in example for all_metrics.

Minor tweaks to formatting for documentation

Fix minor issues with formatting that was causing tests to fail.
neuronull pushed a commit that referenced this pull request Nov 16, 2023
…cy (#19106)

* enhancement(networking, sinks): add full jitter to retry backoff policy

* fmt

* fix tests

* add test

* fix

* force ci
jszwedko pushed a commit that referenced this pull request Nov 16, 2023
…cy (#19106)

* enhancement(networking, sinks): add full jitter to retry backoff policy

* fmt

* fix tests

* add test

* fix

* force ci
dsmith3197 added a commit that referenced this pull request Jan 8, 2024
…cy (#19106)

* enhancement(networking, sinks): add full jitter to retry backoff policy

* fmt

* fix tests

* add test

* fix

* force ci
AndrooTheChen pushed a commit to discord/vector that referenced this pull request Sep 23, 2024
…cy (vectordotdev#19106)

* enhancement(networking, sinks): add full jitter to retry backoff policy

* fmt

* fix tests

* add test

* fix

* force ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: external docs Anything related to Vector's external, public documentation domain: sinks Anything related to the Vector's sinks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants