Skip to content

Commit

Permalink
Remove usage of grpc-gateway in otlpreceiver. Http protocols are diff…
Browse files Browse the repository at this point in the history
…erent than grpc

Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu committed Jun 14, 2021
1 parent e035ad1 commit cd1f10b
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 471 deletions.
12 changes: 6 additions & 6 deletions receiver/otlpreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func createDefaultConfig() config.Receiver {

// CreateTracesReceiver creates a trace receiver based on provided config.
func createTracesReceiver(
ctx context.Context,
_ context.Context,
set component.ReceiverCreateSettings,
cfg config.Receiver,
nextConsumer consumer.Traces,
Expand All @@ -76,15 +76,15 @@ func createTracesReceiver(
return newOtlpReceiver(cfg.(*Config), set.Logger)
})

if err := r.Unwrap().(*otlpReceiver).registerTraceConsumer(ctx, nextConsumer); err != nil {
if err := r.Unwrap().(*otlpReceiver).registerTraceConsumer(nextConsumer); err != nil {
return nil, err
}
return r, nil
}

// CreateMetricsReceiver creates a metrics receiver based on provided config.
func createMetricsReceiver(
ctx context.Context,
_ context.Context,
set component.ReceiverCreateSettings,
cfg config.Receiver,
consumer consumer.Metrics,
Expand All @@ -93,15 +93,15 @@ func createMetricsReceiver(
return newOtlpReceiver(cfg.(*Config), set.Logger)
})

if err := r.Unwrap().(*otlpReceiver).registerMetricsConsumer(ctx, consumer); err != nil {
if err := r.Unwrap().(*otlpReceiver).registerMetricsConsumer(consumer); err != nil {
return nil, err
}
return r, nil
}

// CreateLogReceiver creates a log receiver based on provided config.
func createLogReceiver(
ctx context.Context,
_ context.Context,
set component.ReceiverCreateSettings,
cfg config.Receiver,
consumer consumer.Logs,
Expand All @@ -110,7 +110,7 @@ func createLogReceiver(
return newOtlpReceiver(cfg.(*Config), set.Logger)
})

if err := r.Unwrap().(*otlpReceiver).registerLogsConsumer(ctx, consumer); err != nil {
if err := r.Unwrap().(*otlpReceiver).registerLogsConsumer(consumer); err != nil {
return nil, err
}
return r, nil
Expand Down
301 changes: 0 additions & 301 deletions receiver/otlpreceiver/internal/marshal_jsonpb.go

This file was deleted.

Loading

0 comments on commit cd1f10b

Please sign in to comment.