Skip to content

Commit

Permalink
[receiver/zipkin] Use component.UseLocalHostAsDefaultHost feature gate
Browse files Browse the repository at this point in the history
  • Loading branch information
mx-psi committed Jan 29, 2024
1 parent 5a10c4b commit e27a464
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .chloggen/mx-psi_internal-localhostgate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ issues: [30702]
# Use pipe (|) for multiline entries.
subtext: |
This change affects the following components:
- TBF
- receiver/zipkin
# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
Expand Down
2 changes: 1 addition & 1 deletion receiver/zipkinreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ receivers:
The following settings are configurable:
- `endpoint` (default = 0.0.0.0:9411): host:port on which the receiver is going to receive data.
- `endpoint` (default = 0.0.0.0:9411): host:port on which the receiver is going to receive data. The `component.UseLocalHostAsDefaultHost` feature gate changes this to localhost:9411. This will become the default in a future release.
- `parse_string_tags` (default = false): if enabled, the receiver will attempt to parse string tags/binary annotations into int/bool/float.

## Advanced Configuration
Expand Down
4 changes: 3 additions & 1 deletion receiver/zipkinreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ import (
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/receiver"

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

// This file implements factory for Zipkin receiver.

const (
defaultHTTPPort = 9411
defaultBindEndpoint = "0.0.0.0:9411"
)

Expand All @@ -33,7 +35,7 @@ func NewFactory() receiver.Factory {
func createDefaultConfig() component.Config {
return &Config{
HTTPServerSettings: confighttp.HTTPServerSettings{
Endpoint: defaultBindEndpoint,
Endpoint: localhostgate.EndpointForPort(defaultHTTPPort),
},
ParseStringTags: false,
}
Expand Down
3 changes: 3 additions & 0 deletions receiver/zipkinreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.20

require (
github.com/jaegertracing/jaeger v1.53.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.0.0-00010101000000-000000000000
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.93.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.93.0
github.com/openzipkin/zipkin-go v0.4.2
Expand Down Expand Up @@ -83,6 +84,8 @@ require (

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/common => ../../internal/common

replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin => ../../pkg/translator/zipkin

retract (
Expand Down

0 comments on commit e27a464

Please sign in to comment.