Skip to content

Commit

Permalink
Fix jaeger legacy and kubeletstats metric receivers (#401)
Browse files Browse the repository at this point in the history
The jaeger legacy and kubeletstats receivers were not updated to the latest change in the ReceiverFactoryOld interface open-telemetry/opentelemetry-collector@2f6d603
  • Loading branch information
dmitryax authored and wyTrivail committed Jul 13, 2020
1 parent 65b656a commit 4a3706c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions receiver/jaegerlegacyreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func (f *Factory) CreateTraceReceiver(

// CreateMetricsReceiver creates a metrics receiver based on provided config.
func (f *Factory) CreateMetricsReceiver(
ctx context.Context,
logger *zap.Logger,
cfg configmodels.Receiver,
consumer consumer.MetricsConsumer,
Expand Down
2 changes: 1 addition & 1 deletion receiver/jaegerlegacyreceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestCreateReceiver(t *testing.T) {
assert.NoError(t, err, "receiver creation failed")
assert.NotNil(t, tReceiver, "receiver creation failed")

mReceiver, err := factory.CreateMetricsReceiver(zap.NewNop(), cfg, nil)
mReceiver, err := factory.CreateMetricsReceiver(context.Background(), zap.NewNop(), cfg, nil)
assert.Equal(t, err, configerror.ErrDataTypeIsNotSupported)
assert.Nil(t, mReceiver)
}
Expand Down
1 change: 1 addition & 0 deletions receiver/kubeletstatsreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func (f *Factory) CreateTraceReceiver(
}

func (f *Factory) CreateMetricsReceiver(
ctx context.Context,
logger *zap.Logger,
cfg configmodels.Receiver,
consumer consumer.MetricsConsumerOld,
Expand Down
3 changes: 2 additions & 1 deletion receiver/kubeletstatsreceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func TestCreateTraceReceiver(t *testing.T) {
func TestCreateMetricsReceiver(t *testing.T) {
factory := &Factory{}
metricsReceiver, err := factory.CreateMetricsReceiver(
context.Background(),
zap.NewNop(),
tlsConfig(),
&testbed.MockMetricConsumer{},
Expand All @@ -73,7 +74,7 @@ func TestFactoryBadAuthType(t *testing.T) {
},
},
}
_, err := factory.CreateMetricsReceiver(zap.NewNop(), cfg, &testbed.MockMetricConsumer{})
_, err := factory.CreateMetricsReceiver(context.Background(), zap.NewNop(), cfg, &testbed.MockMetricConsumer{})
require.Error(t, err)
}

Expand Down

0 comments on commit 4a3706c

Please sign in to comment.