♻️ unify endpoint URL building with buildEndpointUrl#4683
Conversation
route endpoint construction through a single helper for core intake, profiling quota, and remote configuration URLs, and expand unit tests to cover proxy normalization, subdomain forwarding, default site fallback, and empty parameters.
Bundles Sizes Evolution
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: e2134c3 | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1b928fa42
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| if (typeof proxy === 'function') { | ||
| return (parameters) => proxy({ path, parameters }) | ||
| return proxy({ path, parameters, subdomain }) |
There was a problem hiding this comment.
Omit subdomain when delegating normal proxy calls
For function proxies on the normal intake paths, subdomain is now always present on the options object with value undefined; before this refactor the SDK called the proxy with only { path, parameters }. Customers whose proxy function branches on property presence (for example, 'subdomain' in options to distinguish quota/remote-configuration subdomain routing) will now misclassify every regular RUM/logs intake request and may build an undefined... host. Only include the property when a subdomain is actually provided.
Useful? React with 👍 / 👎.
|
/to-staging |
|
View all feedbacks in Devflow UI.
Commit e2134c31ca will soon be integrated into staging-22.
Commit e2134c31ca has been merged into staging-22 in merge commit 4d4e1dcb72. If you need to revert this integration, you can use the following command: |
…aging-22 Integrated commit sha: e2134c3 Co-authored-by: BenoitZugmeyer <benoit.zugmeyer@datadoghq.com>
Motivation
Customers using proxy routing should get consistent and predictable intake behavior across Browser SDK features.
This change improves consistency of URL construction so proxy routing, subdomain forwarding, and site-based fallback behave the same way in core ingestion paths, profiling quota checks, and remote configuration fetches.
Changes
buildEndpointUrlin core configuration logicsdk-configurationsubdomain)Test instructions
proxy: '/proxy'in SDK init)./proxyand includeddforward.ddforwardSubdomain=quotawhen proxying is enabled.site.sdk-configurationsubdomain path.Checklist