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

Renovates gRPC instrumentation in preparation of standard parsing #1175

Merged
merged 4 commits into from
Apr 27, 2020

Conversation

codefromthecrypt
Copy link
Member

This fixes some glitches in preparation of #999

  • Bumps gRPC to 1.29 (there was no impact)
  • GrpcClientRequest and GrpcServerRequest unwrapped this, not the call.
  • Anonymous GrpcClientParser and GrpcServerParser used ErrorParser unnecessarily
    • This is implicitly done in the Zipkin span handler
  • Status.cause was ignored
    • This led to a less precise "error" tag
  • Client headers were unnecessarily null during sampling. This was caused by
    too eager allocation of a span.
  • ClientCall.Listener was wrapped twice
  • Most ClientCall hooks were not placed in scope
  • ServerCall's span was started too late

@codefromthecrypt
Copy link
Member Author

FYI continuous-integration/travis-ci/pr rarely passes when you change things in the pom. ex it fails in invoker tests due to drift between master and whatever is in the PR. I'm not sure what this is about, but seems to explain why we get winky (one red one green) builds on changes sometimes.

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Left some comments about how we handle error spans. Since grpc-java stubs implement the lifecycle, which includes propagating errors into close, I believe we don't have to do as much work as we're doing.

@codefromthecrypt
Copy link
Member Author

Thanks for the thoughtful consideration @anuraaga. This is much better than before

@codefromthecrypt
Copy link
Member Author

force pushed as I have no other good ideas on how to get the mockito change to pass in travis.

@codefromthecrypt
Copy link
Member Author

I'm going to special case the mockito depedendency as I cannot get travis to pass in invoker mode in any way

This fixes some glitches in preparation of #999

* Bumps gRPC to 1.29 (there was no impact)
* GrpcClientRequest and GrpcServerRequest unwrapped `this`, not the call.
* Anonymous GrpcClientParser and GrpcServerParser used ErrorParser unnecessarily
  * This is implicitly done in the Zipkin span handler
* Status.cause was ignored
  * This led to a less precise "error" tag
* Client headers were unnecessarily null during sampling. This was caused by
  too eager allocation of a span.
* ClientCall.Listener was wrapped twice
* Most ClientCall hooks were not placed in scope
* ServerCall's span was started too late
@codefromthecrypt
Copy link
Member Author

force pushed again, with specific includes on the grpc invoker tests. At least locally, this doesn't use mockito at all now.

@codefromthecrypt
Copy link
Member Author

I am removing the mockito flag @anuraaga. It is unsupportable and there are so many other things worth time than flailing on this

Mockito cannot mock this class: class io.grpc.MethodDescriptor.

Can not mock final classes with the following settings :

 - explicit serialization (e.g. withSettings().serializable())

 - extra interfaces (e.g. withSettings().extraInterfaces(...))

You are seeing this disclaimer because Mockito is configured to create inlined mocks.

You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.

Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [class io.grpc.MethodDescriptor, class java.lang.Object]

@codefromthecrypt
Copy link
Member Author

fingers crossed.

@codefromthecrypt codefromthecrypt merged commit 3f03476 into master Apr 27, 2020
@codefromthecrypt codefromthecrypt deleted the grpc-renovation branch April 27, 2020 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants