Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/remove_wip_label.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Remove Work In Progress Label

permissions:
issues: write
pull-requests: write

on:
Expand Down
1 change: 1 addition & 0 deletions benches/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ fn benchmark_http(c: &mut Criterion) {
request: Default::default(),
tls: Default::default(),
acknowledgements: Default::default(),
retry_strategy: Default::default(),
},
);

Expand Down
7 changes: 7 additions & 0 deletions changelog.d/10870_http_retry_strategy.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
HTTP-based sinks that use the shared retry helpers now support a `retry_strategy` configuration
option to control which HTTP response codes are retried. The `http` sink also includes a new
example showing how to retry only specific transient status codes.

Issue: https://github.com/vectordotdev/vector/issues/10870

authors: ndrsg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
HTTP-based sinks using the shared retry logic now classify transport-layer failures with
`HttpError::is_retriable`: connection and TLS connector issues may be retried, while failures
such as invalid HTTP request construction or an invalid proxy URI are not. Setting
`retry_strategy` to `none` disables retries for these transport errors and for request
timeouts, in addition to status-code-based retries.

Issue: https://github.com/vectordotdev/vector/issues/10870

authors: ndrsg
3 changes: 3 additions & 0 deletions changelog.d/25194_windows_event_log_lost_wakeup.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The `windows_event_log` source no longer freezes after periods of inactivity.

authors: tot19
9 changes: 9 additions & 0 deletions changelog.d/25328_kafka_oauthbearer_default.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Added support for `sasl.oauthbearer.method=default` in Kafka sink and source. When

Check failure on line 1 in changelog.d/25328_kafka_oauthbearer_default.feature.md

View workflow job for this annotation

GitHub Actions / Check Spelling

`oauthbearer` is not a recognized word (unrecognized-spelling)

Check failure on line 1 in changelog.d/25328_kafka_oauthbearer_default.feature.md

View workflow job for this annotation

GitHub Actions / Check Spelling

`oauthbearer` is not a recognized word (check-file-path)
`sasl.oauthbearer.token.endpoint.url` is set in `librdkafka_options` and the method is

Check failure on line 2 in changelog.d/25328_kafka_oauthbearer_default.feature.md

View workflow job for this annotation

GitHub Actions / Check Spelling

`oauthbearer` is not a recognized word (unrecognized-spelling)
not `oidc`, Vector now implements the OAUTHBEARER token refresh callback, POSTing to the

Check failure on line 3 in changelog.d/25328_kafka_oauthbearer_default.feature.md

View workflow job for this annotation

GitHub Actions / Check Spelling

`OAUTHBEARER` is not a recognized word (unrecognized-spelling)

Check failure on line 3 in changelog.d/25328_kafka_oauthbearer_default.feature.md

View workflow job for this annotation

GitHub Actions / Check Spelling

`oidc` is not a recognized word (unrecognized-spelling)
configured endpoint per RFC 6749 §4.4 and reading `access_token` and `expires_in` from
the response. This enables OAuth2 providers that return opaque tokens, non-standard JWT
expiry fields, or custom grant types (e.g. `authorization_code`) that are incompatible
with `method=oidc`.

Check failure on line 7 in changelog.d/25328_kafka_oauthbearer_default.feature.md

View workflow job for this annotation

GitHub Actions / Check Spelling

`oidc` is not a recognized word (unrecognized-spelling)

authors: dvilaverde
42 changes: 42 additions & 0 deletions config/examples/http_sink_custom_retry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# HTTP sink example with a custom retry strategy
# ----------------------------------------------------
# Sends demo logs to an HTTP endpoint and only retries the response codes
# that the upstream API documents as transient.

data_dir: "/var/lib/vector"

sources:
demo_logs:
type: "demo_logs"
format: "json"
interval: 1

sinks:
http_out:
type: "http"
inputs: ["demo_logs"]
uri: "https://example.com/ingest"
method: "post"

# Skip the startup probe so the example can be adapted locally.
healthcheck:
enabled: false

# Send newline-delimited JSON in the request body.
framing:
method: "newline_delimited"
encoding:
codec: "json"

# Control how many retries are made and how quickly backoff grows.
request:
timeout_secs: 60
retry_attempts: 8
retry_initial_backoff_secs: 2
retry_max_duration_secs: 30

# Retry only on the exact HTTP status codes that this destination
# treats as temporary failures.
retry_strategy:
type: "custom"
status_codes: [408, 425, 429, 503]
6 changes: 6 additions & 0 deletions lib/vector-config/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ use std::cell::RefCell;

use http::StatusCode;
use serde_json::Value;
use vector_config_common::{attributes::CustomAttribute, constants};

use crate::{
Configurable, GenerateError, Metadata, ToValue,
num::NumberClass,
schema::{SchemaGenerator, SchemaObject, generate_number_schema},
};

Expand All @@ -27,6 +29,10 @@ impl Configurable for StatusCode {
let mut metadata = Metadata::default();
metadata.set_description("HTTP response status code");
metadata.set_default_value(StatusCode::OK);
metadata.add_custom_attribute(CustomAttribute::kv(
constants::DOCS_META_NUMERIC_TYPE,
NumberClass::Unsigned,
));
metadata
}

Expand Down
Loading
Loading