Skip to content

[chore] [receiver/datadogreceiver] Migrate ReverseProxy.Director to Rewrite - #50450

Open
singhvibhanshu wants to merge 2 commits into
open-telemetry:mainfrom
singhvibhanshu:MigrateReverseProxyDotDirectortoRewrite
Open

[chore] [receiver/datadogreceiver] Migrate ReverseProxy.Director to Rewrite#50450
singhvibhanshu wants to merge 2 commits into
open-telemetry:mainfrom
singhvibhanshu:MigrateReverseProxyDotDirectortoRewrite

Conversation

@singhvibhanshu

Copy link
Copy Markdown
Member

Description

This PR migrates the intake reverse proxy from httputil.ReverseProxy.Director to Rewrite. Director is deprecated as of Go 1.26 in favor of Rewrite, which has been available since Go 1.20. The rewrite hook operates on ProxyRequest.Out rather than the request directly.

Unlike Director, Rewrite strips the X-Forwarded-* headers before it is called and does not re-add them. This PR calls pr.SetXForwarded() to preserve the previous X-Forwarded-For behavior, keeping the outbound request identical.

Link to tracking issue

Fixes #50418

Testing

Tuned.

Documentation

~

Authorship

  • I, a human, wrote this pull request description myself.

Signed-off-by: singhvibhanshu <find.vibhanshu@gmail.com>
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Aug 22, 2026

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-08-22 17:21 UTC

Two things need attention:

  • Required checks are failing — investigate the failures.
  • 1 review item — respond to each (e.g. link a commit, explain why not, ask a follow-up):
    • Top-level threads: 1
Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Should this be with reviewers? Comment /dashboard route:reviewers to route it to them.
  • Anything wrong — including the routing? Report it with what you expected; it helps us improve the dashboard.

@paulojmdias

Copy link
Copy Markdown
Member

PTAL into CI errors

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[receiver/datadogreceiver] Migrate ReverseProxy.Director to Rewrite

2 participants