Skip to content

Commit

Permalink
Remove unnecessary constant and check (#1207)
Browse files Browse the repository at this point in the history
Support was removed in #636 and the error will still be returned because we return an error for every unknown protocol.
  • Loading branch information
bogdandrutu committed Jun 26, 2020
1 parent 99d6040 commit 2fccde6
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions receiver/jaegerreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"strconv"

"github.com/spf13/viper"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

Expand All @@ -39,12 +38,10 @@ const (
typeStr = "jaeger"

// Protocol values.
protoGRPC = "grpc"
protoThriftHTTP = "thrift_http"
// Deprecated, see https://go.opentelemetry.io/collector/issues/267
protoThriftTChannel = "thrift_tchannel"
protoThriftBinary = "thrift_binary"
protoThriftCompact = "thrift_compact"
protoGRPC = "grpc"
protoThriftHTTP = "thrift_http"
protoThriftBinary = "thrift_binary"
protoThriftCompact = "thrift_compact"

// Default endpoints to bind to.
defaultGRPCBindEndpoint = "0.0.0.0:14250"
Expand Down Expand Up @@ -126,14 +123,12 @@ func (f *Factory) CreateTraceReceiver(

protoGRPC := rCfg.Protocols[protoGRPC]
protoHTTP := rCfg.Protocols[protoThriftHTTP]
protoTChannel := rCfg.Protocols[protoThriftTChannel]
protoThriftCompact := rCfg.Protocols[protoThriftCompact]
protoThriftBinary := rCfg.Protocols[protoThriftBinary]
remoteSamplingConfig := rCfg.RemoteSampling

config := Configuration{}
var grpcServerOptions []grpc.ServerOption
logger := params.Logger

// Set ports
if protoGRPC != nil {
Expand Down Expand Up @@ -161,10 +156,6 @@ func (f *Factory) CreateTraceReceiver(
}
}

if protoTChannel != nil {
logger.Warn("Protocol unknown or not supported", zap.String("protocol", protoThriftTChannel))
}

if protoThriftBinary != nil {
var err error
config.AgentBinaryThriftPort, err = extractPortFromEndpoint(protoThriftBinary.Endpoint)
Expand Down

0 comments on commit 2fccde6

Please sign in to comment.