Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/jaegerreceiver] Add remote sampling deprecation warning #13408

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.",
)
})
}
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]