Skip to content

Commit

Permalink
[internal/aws/proxy] adopt component.UseLocalHostAsDefaultHost feat…
Browse files Browse the repository at this point in the history
…ure gate (#30987)

Description:
internal/aws/proxy adopts `component.UseLocalHostAsDefaultHost` feature
gate

Link to tracking Issue:

#30702

Fixes
#30986

Documentation:
Updated docs.

---------

Co-authored-by: Pablo Baeyens <[email protected]>
Co-authored-by: Pablo Baeyens <[email protected]>
  • Loading branch information
3 people authored Feb 1, 2024
1 parent 0e28e15 commit f12f0ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .chloggen/mx-psi_internal-localhostgate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ subtext: |
- extension/awsproxy
- extension/health_check
- extension/jaegerremotesampling
- internal/aws/proxy
- processor/remotetap
- receiver/awsfirehose
- receiver/awsxray
Expand Down
4 changes: 3 additions & 1 deletion internal/aws/proxy/cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ package proxy // import "github.com/open-telemetry/opentelemetry-collector-contr
import (
"go.opentelemetry.io/collector/config/confignet"
"go.opentelemetry.io/collector/config/configtls"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/localhostgate"
)

// Config is the configuration for the local TCP proxy server.
Expand Down Expand Up @@ -43,7 +45,7 @@ type Config struct {
func DefaultConfig() *Config {
return &Config{
TCPAddr: confignet.TCPAddr{
Endpoint: "0.0.0.0:2000",
Endpoint: localhostgate.EndpointForPort(2000),
},
ProxyAddress: "",
TLSSetting: configtls.TLSClientSetting{
Expand Down
2 changes: 2 additions & 0 deletions receiver/awsxrayreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ The TCP address and port on which this receiver listens for calls from the X-Ray

Default: `0.0.0.0:2000`

The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:2000. This will become the default in a future release.

### proxy_address (Optional)
Defines the proxy address that the local TCP server forwards HTTP requests to AWS X-Ray backend through. If left unconfigured, requests will be sent directly.

Expand Down

0 comments on commit f12f0ad

Please sign in to comment.