Skip to content

Make payload URLs relative - #327

Merged
vickenty merged 1 commit into
masterfrom
vickenty/dhu
Aug 7, 2026
Merged

Make payload URLs relative#327
vickenty merged 1 commit into
masterfrom
vickenty/dhu

Conversation

@vickenty

@vickenty vickenty commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Make Forwarder::send accept relative URLs, that are resolved on top of the base URL. Base URL is provided by the ForwarderContext instance, where it is either pulled from an environment variable, or supplied by the user directly.

Make Forwarder::send accept relative URLs, that are resolved on top of
the base URL. Base URL is provided by the ForwarderContext instance,
where it is either pulled from an environment variable, or supplied
by the user directly.
@vickenty
vickenty marked this pull request as ready for review August 7, 2026 12:51
@vickenty
vickenty requested a review from a team as a code owner August 7, 2026 12:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review


P2 Badge Preserve absolute-URI sends without a base URL

When an existing caller builds a forwarder with Forwarder.builder().build() and continues to pass absolute endpoints to send(), this now calls ForwarderContext.defaults() and throws unless DD_DOGSTATSD_HTTP_URL is set, even though URI.resolve does not need a base for absolute payload URLs. This turns the new relative-URL support into a breaking requirement for deployments that already supplied full URLs per request; please keep the base optional for absolute payload URLs or provide a non-env default path for those callers.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

* Builds the context, running detection for any value not set explicitly.
*
* @return a new context.
* @throws URISyntaxException if baseUri value is not a valid URI.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should be IllegalStateException or IllegalArgumentException instead

Base automatically changed from vickenty/dho to master August 7, 2026 19:10
@vickenty
vickenty merged commit 65045a5 into master Aug 7, 2026
18 checks passed
@vickenty
vickenty deleted the vickenty/dhu branch August 7, 2026 19:10
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.

2 participants