Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gRPC communication between agent and collector #1165

Merged
merged 14 commits into from
Nov 13, 2018
Prev Previous commit
Next Next commit
Add todo
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
  • Loading branch information
pavolloffay committed Nov 13, 2018
commit b530e878fcccdfc172b3743a765ec7a4f1f66c6a
1 change: 1 addition & 0 deletions cmd/agent/app/reporter/grpc/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func NewReporter(conn *grpc.ClientConn, logger *zap.Logger) *Reporter {

// EmitBatch implements EmitBatch() of Reporter
func (r *Reporter) EmitBatch(b *thrift.Batch) error {
// TODO pass process to r.send() - do not convert it for every span
spans := jConverter.ToDomain(b.Spans, b.Process)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems redundant to pass Process (that presumably will be added to each span) and then dedupe that same process in send(). I suggest passing Process directly to send(), and do the index-0 trick in the Zipkin path only.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a quick look there is no to domain without process. I would prefer a separate PR this is already quite long.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add todo in the code and action in the PR comment

return r.send(spans)
}
Expand Down