Skip to content

Commit

Permalink
[receiver/jaegerreceiver] Add remote sampling deprecation warning
Browse files Browse the repository at this point in the history
Signed-off-by: Benedikt Bongartz <[email protected]>
  • Loading branch information
frzifus committed Aug 22, 2022
1 parent 2892f12 commit 828ee49
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
14 changes: 14 additions & 0 deletions receiver/jaegerreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ package jaegerreceiver // import "github.com/open-telemetry/opentelemetry-collec

import (
"context"
"sync"

"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/config/configgrpc"
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/config/confignet"
"go.opentelemetry.io/collector/consumer"
"go.uber.org/zap"
)

const (
Expand Down Expand Up @@ -113,6 +115,8 @@ func createTracesReceiver(
}

if remoteSamplingConfig != nil {
logSamplingDeprecation(set.Logger)

config.RemoteSamplingClientSettings = remoteSamplingConfig.GRPCClientSettings
if config.RemoteSamplingClientSettings.Endpoint == "" {
config.RemoteSamplingClientSettings.Endpoint = defaultGRPCBindEndpoint
Expand All @@ -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.",
)
})
}
11 changes: 11 additions & 0 deletions unreleased/deprecate_jaeger_remote_sampling_on_receiver_#6633.yaml
Original file line number Diff line number Diff line change
@@ -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]

0 comments on commit 828ee49

Please sign in to comment.