Repository navigation
[SVLS-8713] feat(logs-agent): optional API key resolver and Datadog intake URL override - #192
Draft
litianningdatadog wants to merge 1 commit into
Conversation
This was referenced Oct 21, 2026
litianningdatadog
force-pushed
the
tianning.li/logs-sc-2-aggregator-options
branch
from
October 21, 2026 19:50
da1b92b to
ab4758c
Compare
litianningdatadog
force-pushed
the
tianning.li/logs-sc-3a-key-and-url
branch
from
October 21, 2026 19:50
a08242d to
a107102
Compare
…erride Why: bottlecap gets its API key lazily (it may come from AWS Secrets Manager and can be reloaded) and lets users point logs at a custom intake URL. This crate only took a fixed key and a fixed URL, so bottlecap could not use it without changing behavior for Lambda users. What: the flusher gets two optional builder methods. with_api_key_resolver() calls a key resolver for the primary key on every flush, so a reloaded key is used right away; if no key comes back, the primary is skipped for that flush with one error line and additional endpoints are still sent. with_datadog_intake_url() replaces the default Datadog intake URL. Without them the flusher behaves exactly as before, and no dependencies are added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
litianningdatadog
force-pushed
the
tianning.li/logs-sc-3a-key-and-url
branch
from
October 21, 2026 19:52
a107102 to
7105107
Compare
litianningdatadog
force-pushed
the
tianning.li/logs-sc-2-aggregator-options
branch
from
October 21, 2026 19:52
ab4758c to
179bcd8
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Two optional builder methods on
LogFlusher:with_api_key_resolver(ApiKeyResolver): an async closure called for the primary key on every flush, so a reloaded key is used right away. If it returns no key, the primary is skipped for that flush with one error line; additional endpoints are still sent.with_datadog_intake_url(url): replaces the default Datadog intake URL (keeps any path), Datadog mode only.Motivation
Part of SVLS-8713: bottlecap (the Datadog Lambda Extension) is replacing its own logs aggregator and flusher with this crate. Two rules for the whole stack:
bottlecap's key can come from AWS Secrets Manager/KMS/SSM and can be reloaded (
api_key_secret_reload_interval), and users can setDD_LOGS_CONFIG_LOGS_DD_URL. A closure instead of taking bottlecap's key factory type keepsdogstatsd(~38 crates) out of this crate.Additional Notes
Without these methods the flusher behaves exactly as before. No new dependencies.
Describe how to test/QA your changes
98 tests pass (new: resolved key used, resolver called every flush, reloaded key used next flush, no-key path still sends extras, URL override used in Datadog mode and ignored for OPW).
Stack
Each PR is nested under the PR it builds on (and targets). Review and merge from the top down.
serverless-components (
datadog-logs-agentoptions; merge first)maindefault/fipsfeaturesretry()+FlushPolicydatadog-lambda-extension (bottlecap)
main🤖 Generated with Claude Code