Skip to content

Commit

Permalink
Fix breaking change in upgrading OTEL Collector (jaegertracing#5314)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Fix jaegertracing#5302 

## Description of the changes
- 

## How was this change tested?
- 

## Checklist
- [X] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [X] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: mevrin <matthieu.evrin@gmail.com>
  • Loading branch information
lekaf974 authored Apr 2, 2024
1 parent f18416a commit 4482086
Show file tree
Hide file tree
Showing 8 changed files with 230 additions and 80 deletions.
2 changes: 1 addition & 1 deletion cmd/jaeger/internal/components_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestComponents(t *testing.T) {
assert.NotNil(t, factories.Processors)
assert.NotNil(t, factories.Connectors)

_, jaegerReceiverFactoryExists := factories.Receivers["jaeger"]
_, jaegerReceiverFactoryExists := factories.Receivers[component.MustNewType("jaeger")]
assert.True(t, jaegerReceiverFactoryExists)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/jaeger/internal/exporters/storageexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// componentType is the name of this extension in configuration.
const componentType = component.Type("jaeger_storage_exporter")
var componentType = component.MustNewType("jaeger_storage_exporter")

// ID is the identifier of this extension.
var ID = component.NewID(componentType)
Expand Down
2 changes: 1 addition & 1 deletion cmd/jaeger/internal/extension/jaegerquery/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// componentType is the name of this extension in configuration.
const componentType = component.Type("jaeger_query")
var componentType = component.MustNewType("jaeger_query")

// ID is the identifier of this extension.
var ID = component.NewID(componentType)
Expand Down
2 changes: 1 addition & 1 deletion cmd/jaeger/internal/extension/jaegerstorage/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// componentType is the name of this extension in configuration.
const componentType = component.Type("jaeger_storage")
var componentType = component.MustNewType("jaeger_storage")

// ID is the identifier of this extension.
var ID = component.NewID(componentType)
Expand Down
2 changes: 1 addition & 1 deletion cmd/jaeger/internal/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type StorageIntegration struct {
// that is a duplication from the collector's extension. And get
// the exporter TraceStorage name to set it to receiver TraceStorage.
func (s *StorageIntegration) newDataReceiver(t *testing.T, factories otelcol.Factories) testbed.DataReceiver {
fmp := fileprovider.New()
fmp := fileprovider.NewWithSettings(confmap.ProviderSettings{})
configProvider, err := otelcol.NewConfigProvider(
otelcol.ConfigProviderSettings{
ResolverSettings: confmap.ResolverSettings{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// componentType is the name of this extension in configuration.
const componentType = component.Type("jaeger_storage_receiver")
var componentType = component.MustNewType("jaeger_storage_receiver")

// ID is the identifier of this extension.
var ID = component.NewID(componentType)
Expand Down
149 changes: 75 additions & 74 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
require (
github.com/HdrHistogram/hdrhistogram-go v1.1.2
github.com/Shopify/sarama v1.37.2
github.com/apache/thrift v0.19.0
github.com/apache/thrift v0.20.0
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/bsm/sarama-cluster v2.1.13+incompatible
github.com/crossdock/crossdock-go v0.0.0-20160816171116-049aabb0122b
Expand All @@ -24,13 +24,13 @@ require (
github.com/hashicorp/go-plugin v1.6.0
github.com/kr/pretty v0.3.1
github.com/olivere/elastic v6.2.37+incompatible
github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.96.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.96.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.96.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.96.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.96.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.96.0
github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.96.0
github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.97.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.97.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.97.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.97.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.97.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.97.0
github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.97.0
github.com/prometheus/client_golang v1.19.0
github.com/prometheus/client_model v0.6.0
github.com/prometheus/common v0.51.0
Expand All @@ -41,28 +41,28 @@ require (
github.com/stretchr/testify v1.9.0
github.com/uber/jaeger-client-go v2.30.0+incompatible
github.com/xdg-go/scram v1.1.2
go.opentelemetry.io/collector/component v0.96.0
go.opentelemetry.io/collector/config/configgrpc v0.96.0
go.opentelemetry.io/collector/config/confighttp v0.96.0
go.opentelemetry.io/collector/config/configretry v0.96.0
go.opentelemetry.io/collector/config/configtls v0.96.0
go.opentelemetry.io/collector/confmap v0.96.0
go.opentelemetry.io/collector/connector v0.96.0
go.opentelemetry.io/collector/connector/forwardconnector v0.96.0
go.opentelemetry.io/collector/consumer v0.96.0
go.opentelemetry.io/collector/exporter v0.96.0
go.opentelemetry.io/collector/exporter/otlpexporter v0.96.0
go.opentelemetry.io/collector/exporter/otlphttpexporter v0.96.0
go.opentelemetry.io/collector/extension v0.96.0
go.opentelemetry.io/collector/extension/ballastextension v0.96.0
go.opentelemetry.io/collector/extension/zpagesextension v0.96.0
go.opentelemetry.io/collector/otelcol v0.96.0
go.opentelemetry.io/collector/pdata v1.3.0
go.opentelemetry.io/collector/processor v0.96.0
go.opentelemetry.io/collector/processor/batchprocessor v0.96.0
go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.96.0
go.opentelemetry.io/collector/receiver v0.96.0
go.opentelemetry.io/collector/receiver/otlpreceiver v0.96.0
go.opentelemetry.io/collector/component v0.97.0
go.opentelemetry.io/collector/config/configgrpc v0.97.0
go.opentelemetry.io/collector/config/confighttp v0.97.0
go.opentelemetry.io/collector/config/configretry v0.97.0
go.opentelemetry.io/collector/config/configtls v0.97.0
go.opentelemetry.io/collector/confmap v0.97.0
go.opentelemetry.io/collector/connector v0.97.0
go.opentelemetry.io/collector/connector/forwardconnector v0.97.0
go.opentelemetry.io/collector/consumer v0.97.0
go.opentelemetry.io/collector/exporter v0.97.0
go.opentelemetry.io/collector/exporter/otlpexporter v0.97.0
go.opentelemetry.io/collector/exporter/otlphttpexporter v0.97.0
go.opentelemetry.io/collector/extension v0.97.0
go.opentelemetry.io/collector/extension/ballastextension v0.97.0
go.opentelemetry.io/collector/extension/zpagesextension v0.97.0
go.opentelemetry.io/collector/otelcol v0.97.0
go.opentelemetry.io/collector/pdata v1.4.0
go.opentelemetry.io/collector/processor v0.97.0
go.opentelemetry.io/collector/processor/batchprocessor v0.97.0
go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.97.0
go.opentelemetry.io/collector/receiver v0.97.0
go.opentelemetry.io/collector/receiver/otlpreceiver v0.97.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0
go.opentelemetry.io/otel v1.24.0
Expand All @@ -78,17 +78,17 @@ require (
go.uber.org/zap v1.27.0
golang.org/x/net v0.22.0
golang.org/x/sys v0.18.0
google.golang.org/grpc v1.62.0
google.golang.org/grpc v1.62.1
google.golang.org/protobuf v1.33.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/IBM/sarama v1.43.0 // indirect
github.com/VividCortex/gohistogram v1.0.0 // indirect
github.com/aws/aws-sdk-go v1.50.27 // indirect
github.com/aws/aws-sdk-go v1.51.7 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
Expand All @@ -100,7 +100,7 @@ require (
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/elastic/elastic-transport-go/v8 v8.4.0 // indirect
github.com/expr-lang/expr v1.16.1 // indirect
github.com/expr-lang/expr v1.16.2 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
Expand All @@ -109,7 +109,7 @@ require (
github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/flatbuffers v1.12.1 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand All @@ -124,6 +124,7 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
Expand Down Expand Up @@ -154,23 +155,23 @@ require (
github.com/mostynb/go-grpc-compression v1.2.2 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.96.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.96.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opencensusexporter v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.97.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.97.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.97.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openzipkin/zipkin-go v0.4.2 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
Expand All @@ -187,7 +188,7 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/shirou/gopsutil/v3 v3.24.1 // indirect
github.com/shirou/gopsutil/v3 v3.24.2 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
Expand All @@ -201,26 +202,26 @@ require (
github.com/valyala/fastjson v1.6.4 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/collector v0.96.0 // indirect
go.opentelemetry.io/collector/config/configauth v0.96.0 // indirect
go.opentelemetry.io/collector/config/configcompression v0.96.0 // indirect
go.opentelemetry.io/collector/config/confignet v0.96.0 // indirect
go.opentelemetry.io/collector/config/configopaque v1.3.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.96.0 // indirect
go.opentelemetry.io/collector/config/internal v0.96.0 // indirect
go.opentelemetry.io/collector/confmap/converter/expandconverter v0.96.0 // indirect
go.opentelemetry.io/collector/confmap/provider/envprovider v0.96.0 // indirect
go.opentelemetry.io/collector/confmap/provider/fileprovider v0.96.0
go.opentelemetry.io/collector/confmap/provider/httpprovider v0.96.0 // indirect
go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.96.0 // indirect
go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.96.0 // indirect
go.opentelemetry.io/collector/exporter/debugexporter v0.96.0
go.opentelemetry.io/collector/extension/auth v0.96.0 // indirect
go.opentelemetry.io/collector/featuregate v1.3.0 // indirect
go.opentelemetry.io/collector/semconv v0.96.0 // indirect
go.opentelemetry.io/collector/service v0.96.0 // indirect
go.opentelemetry.io/collector v0.97.0 // indirect
go.opentelemetry.io/collector/config/configauth v0.97.0 // indirect
go.opentelemetry.io/collector/config/configcompression v1.4.0 // indirect
go.opentelemetry.io/collector/config/confignet v0.97.0 // indirect
go.opentelemetry.io/collector/config/configopaque v1.4.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.97.0 // indirect
go.opentelemetry.io/collector/config/internal v0.97.0 // indirect
go.opentelemetry.io/collector/confmap/converter/expandconverter v0.97.0 // indirect
go.opentelemetry.io/collector/confmap/provider/envprovider v0.97.0 // indirect
go.opentelemetry.io/collector/confmap/provider/fileprovider v0.97.0
go.opentelemetry.io/collector/confmap/provider/httpprovider v0.97.0 // indirect
go.opentelemetry.io/collector/confmap/provider/httpsprovider v0.97.0 // indirect
go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.97.0 // indirect
go.opentelemetry.io/collector/exporter/debugexporter v0.97.0
go.opentelemetry.io/collector/extension/auth v0.97.0 // indirect
go.opentelemetry.io/collector/featuregate v1.4.0 // indirect
go.opentelemetry.io/collector/semconv v0.97.0 // indirect
go.opentelemetry.io/collector/service v0.97.0 // indirect
go.opentelemetry.io/contrib/config v0.4.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.24.0 // indirect
go.opentelemetry.io/contrib/zpages v0.49.0 // indirect
Expand All @@ -234,9 +235,9 @@ require (
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
golang.org/x/text v0.14.0 // indirect
gonum.org/v1/gonum v0.14.0 // indirect
gonum.org/v1/gonum v0.15.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
Loading

0 comments on commit 4482086

Please sign in to comment.