diff --git a/receiver/jaegerreceiver/factory.go b/receiver/jaegerreceiver/factory.go index e95adb835b16..ad9be76b4830 100644 --- a/receiver/jaegerreceiver/factory.go +++ b/receiver/jaegerreceiver/factory.go @@ -18,6 +18,7 @@ package jaegerreceiver // import "github.com/open-telemetry/opentelemetry-collec import ( "context" + "sync" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" @@ -25,6 +26,7 @@ import ( "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" + "go.uber.org/zap" ) const ( @@ -113,6 +115,8 @@ func createTracesReceiver( } if remoteSamplingConfig != nil { + logSamplingDeprecation(set.Logger) + config.RemoteSamplingClientSettings = remoteSamplingConfig.GRPCClientSettings if config.RemoteSamplingClientSettings.Endpoint == "" { config.RemoteSamplingClientSettings.Endpoint = defaultGRPCBindEndpoint @@ -133,3 +137,13 @@ func createTracesReceiver( // Create the receiver. return newJaegerReceiver(rCfg.ID(), &config, nextConsumer, set), nil } + +var once sync.Once + +func logSamplingDeprecation(logger *zap.Logger) { + once.Do(func() { + logger.Warn( + "Jaeger remote sampling support is deprecated and will be removed in release v0.61.0. Use the jaegerremotesampling extension instead.", + ) + }) +} diff --git a/unreleased/deprecate_jaeger_remote_sampling_on_receiver_#6633.yaml b/unreleased/deprecate_jaeger_remote_sampling_on_receiver_#6633.yaml new file mode 100755 index 000000000000..3feb525ad77e --- /dev/null +++ b/unreleased/deprecate_jaeger_remote_sampling_on_receiver_#6633.yaml @@ -0,0 +1,11 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: deprecation + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: jaegerreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add remote sampling deprecation warning + +# One or more tracking issues related to the change +issues: [6633]