Skip to content

[SVLS-9373] fix(config): trim trailing slashes from DD URL env vars#1298

Open
shreyamalpani wants to merge 3 commits into
mainfrom
shreya.malpani/fix-dd-url-env-vars-support
Open

[SVLS-9373] fix(config): trim trailing slashes from DD URL env vars#1298
shreyamalpani wants to merge 3 commits into
mainfrom
shreya.malpani/fix-dd-url-env-vars-support

Conversation

@shreyamalpani

@shreyamalpani shreyamalpani commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Overview

DD_URL, DD_DD_URL, and DD_APM_DD_URL were not trimming trailing slashes before being used to build intake URLs. This caused failures such as failing dogstatsd's DdUrl/DdDdUrl prefix validation, panicking with can't parse DD_DD_URL: UrlPrefixError(...) in start_metrics_flushers.

The fix lives upstream in datadog-agent-config: DataDog/serverless-components#142.

This PR bumps bottlecap's serverless-components pin to the merged fix commit, and bumps bottlecap's own direct libdatadog pins to match.

Motivation

SVLS-9373

Testing

  • Added tests in serverless-components
  • Manually tested on a Lambda function that the extension no longer panics after these changes

Copilot AI review requested due to automatic review settings July 7, 2026 19:06
@shreyamalpani shreyamalpani requested a review from a team as a code owner July 7, 2026 19:06
@datadog-official

datadog-official Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 3 Pipeline jobs failed

DataDog/datadog-lambda-extension | integration-suite: [lmi]   View in Datadog   GitLab

DataDog/datadog-lambda-extension | integration-suite: [on-demand]   View in Datadog   GitLab

DataDog/datadog-lambda-extension | integration-suite: [snapstart]   View in Datadog   GitLab

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: eb07612 | Docs | Datadog PR Page | Give us feedback!

@shreyamalpani shreyamalpani changed the title [SVLS-9373] fix(config): trim trailing slashes from DD_URL/DD_DD_URL/DD_APM_DD_URL [SVLS-9373] fix(config): trim trailing slashes from DD URL env vars Jul 7, 2026
Comment thread bottlecap/src/config/mod.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Bottlecap’s pinned upstream configuration dependencies so that DD_URL, DD_DD_URL, and DD_APM_DD_URL inputs are normalized (trailing slashes trimmed) before being used to build intake URLs, preventing URL prefix validation failures and panics in metrics flusher initialization.

Changes:

  • Bumped serverless-components (including datadog-agent-config and dogstatsd) to a revision that trims trailing slashes for relevant DD_*_URL env vars.
  • Bumped libdatadog git pins to a matching revision and updated the lockfile accordingly.
  • Added unit tests in Bottlecap config parsing to ensure DD_URL and DD_DD_URL with trailing slashes remain parseable after normalization.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
bottlecap/src/config/mod.rs Adds regression tests for DD_URL/DD_DD_URL trailing-slash normalization behavior.
bottlecap/Cargo.toml Updates git revisions for serverless-components and libdatadog dependencies.
bottlecap/Cargo.lock Refreshes the dependency graph to reflect updated git pins and transitive version changes.

Comment thread bottlecap/src/config/mod.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants