Skip to content

Refactor synthetics proxy helpers out of base - #2257

Open
Drarig29 wants to merge 2 commits into
masterfrom
corentin.girard/refactor-synthetics-tunnel-proxy
Open

Drarig29 wants to merge 2 commits into
masterfrom
corentin.girard/refactor-synthetics-tunnel-proxy

Conversation

@Drarig29

@Drarig29 Drarig29 commented Apr 10, 2026 •

Copy link
Copy Markdown
Collaborator

What and why?

This PR moves the structured proxy configuration owned by Synthetics out of @datadog/datadog-ci-base and into the Synthetics package, since Synthetics is the only command surface that exposes that JSON proxy config. It also keeps the current tunnel behavior working after the refactor.

This reduces the base package API surface by removing Synthetics-specific proxy helpers from it, while keeping the separate metrics.ts proxy-agent cleanup out of scope for this change.

How?

Base request helpers now accept an injected undici dispatcher instead of a Synthetics-specific proxyOpts object. Synthetics now owns its local ProxyConfiguration type, proxy URL construction, HTTP dispatcher creation, and tunnel proxy-agent creation in a dedicated proxy helper module.

The tunnel and API code were rewired to use those local helpers, and the affected unit tests were updated accordingly. I also ran formatting to address the import-order lint failures reported by CI.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)

@Drarig29 Drarig29 added the synthetics Related to [synthetics] label Apr 10, 2026
@Drarig29
Drarig29 marked this pull request as ready for review April 10, 2026 17:18
@Drarig29
Drarig29 requested review from a team as code owners April 10, 2026 17:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

synthetics Related to [synthetics]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant