Skip to content

Commit

Permalink
Switch Jaeger receiver to internal data model
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax committed Apr 18, 2020
1 parent 5e3b4e2 commit 1ccb464
Show file tree
Hide file tree
Showing 15 changed files with 668 additions and 323 deletions.
2 changes: 1 addition & 1 deletion consumer/pdata/generated_common.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions consumer/pdata/generated_metrics.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion consumer/pdata/generated_resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions consumer/pdata/generated_trace.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/data_generator/internal/base_structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

const sliceTemplate = `// ${structName} logically represents a slice of ${elementName}.
//
// This is a reference type, if passsed by value and callee modifies it the
// This is a reference type, if passed by value and callee modifies it the
// caller will see the modification.
//
// Must use New${structName} function to create new instances.
Expand Down Expand Up @@ -210,7 +210,7 @@ func fillTest${structName}(tv ${structName}) {

const messageTemplate = `${description}
//
// This is a reference type, if passsed by value and callee modifies it the
// This is a reference type, if passed by value and callee modifies it the
// caller will see the modification.
//
// Must use New${structName} function to create new instances.
Expand Down
2 changes: 1 addition & 1 deletion internal/data_generator/internal/files.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions receiver/jaegerreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ func (f *Factory) CreateDefaultConfig() configmodels.Receiver {
// CreateTraceReceiver creates a trace receiver based on provided config.
func (f *Factory) CreateTraceReceiver(
ctx context.Context,
logger *zap.Logger,
params component.ReceiverCreateParams,
cfg configmodels.Receiver,
nextConsumer consumer.TraceConsumerOld,
nextConsumer consumer.TraceConsumer,
) (component.TraceReceiver, error) {

// Convert settings in the source config to Configuration struct
Expand All @@ -130,6 +130,7 @@ func (f *Factory) CreateTraceReceiver(

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

// Set ports
if protoGRPC != nil && protoGRPC.IsEnabled() {
Expand Down Expand Up @@ -213,14 +214,15 @@ func (f *Factory) CreateTraceReceiver(
}

// Create the receiver.
return New(rCfg.Name(), &config, nextConsumer, logger)
return New(rCfg.Name(), &config, nextConsumer, params)
}

// CreateMetricsReceiver creates a metrics receiver based on provided config.
func (f *Factory) CreateMetricsReceiver(
logger *zap.Logger,
ctx context.Context,
params component.ReceiverCreateParams,
cfg configmodels.Receiver,
consumer consumer.MetricsConsumerOld,
consumer consumer.MetricsConsumer,
) (component.MetricsReceiver, error) {
return nil, configerror.ErrDataTypeIsNotSupported
}
Expand Down
Loading

0 comments on commit 1ccb464

Please sign in to comment.