-
Notifications
You must be signed in to change notification settings - Fork 1.9k
enhancement(datadog_agent source): Add request timeout support #24245
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
Conversation
Can you explain the effect of implementing this change? i.e. What will returning 503 make the agent do, and how would that in turn affect Vector? |
Comment added here, and I will update the docs as @pront suggests. |
|
FWIW the |
|
Hi team, added a |
I added more docs, so I think that's ready for review. |
|
Regarding the spelling errors on |
|
Tangential note: this timeout mechanism could and probably should be extended to other HTTP-based sources (most importantly |
Absolutely. That's why the core of this mechanism is in all the common code and not just in the |
Summary
This change adds support for a configurable
send_timeout_secsoption to thedatadog_agentsource. When configured, the source will reject requests with a HTTP 503 response code after the configured time when the downstream buffer cannot accept the new events in time. It defaults to no timeout, preserving the existing behavior.Without the timeout, the Datadog Agent will eventually drop the connection itself, which Vector will detect and report as an "Events dropped." error as well as incrementing the
component_events_dropped_totalmetric. However, in both cases, either connection drop or explicit timeout, the Agent will continue to retry the request indefinitely. As such, this does not change the end result, only the reporting of it and the speed at which it is reported.Vector configuration
How did you test this PR?
There are internal unit tests that confirm the behavior with a running source.
Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
Notes
@vectordotdev/vectorto reach out to us regarding this PR.pre-pushhook, please see this template.make fmtmake check-clippy(if there are failures it's possible some of them can be fixed withmake clippy-fix)make testgit merge origin masterandgit push.Cargo.lock), pleaserun
make build-licensesto regenerate the license inventory and commit the changes (if any). More details here.