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 instrumentation for gRPC 1.40.0+ #518

Merged
merged 1 commit into from
Nov 19, 2021

Conversation

fcaylus
Copy link
Contributor

@fcaylus fcaylus commented Oct 27, 2021

Before contributing, please read our contributing guidelines and code of conduct.

Overview

Hello ! I noticed the issue for compatibility with gRPC 1.40.0+, and just thought I'd contribute.
I took inspiration from #92, which added support of gRPC 1.30.0.

The only difference with the 1.30.0 instrumentation is the class ServerImpl_Instrumentation, where the startCall() method was replaced by the wrapMethod() method. Indeed the startCall() method was refactored in this commit in grpc-java repo.

I also manually tested it in a project at work, and it seems to work fine.

Quick notes:

  • In build.gradle, line 36, I used the latest available gRPC version (1.41.0), however I kept version 1.40.1 in the dependencies (as it's the first version the instrumentation is compatible with). I'm not sure if I should use the same version or not ?
  • I updated the copyrights headers to "2021". I can put "2020" back if needed.

Related Github Issue

Testing

The agent includes a suite of tests which should be used to
verify your changes don't break existing functionality. These tests will run with
Github Actions when a pull request is made. More details on running the tests locally can be found
here,

Checks

  • Are your contributions backwards compatible with relevant frameworks and APIs?
  • Does your code contain any breaking changes? Please describe.
  • Does your code introduce any new dependencies? Please describe.
    • Updated version of io.grpc:grpc-all

@CLAassistant
Copy link

CLAassistant commented Oct 27, 2021

CLA assistant check
All committers have signed the CLA.

@jasonjkeller
Copy link
Contributor

@fcaylus Thanks for the contribution! We're reviewing!

@jasonjkeller
Copy link
Contributor

jasonjkeller commented Nov 17, 2021

Branch rebased against main for running internal tests: https://github.com/newrelic/newrelic-java-agent/tree/pr-518

AITs: 🟢
Tests passed on PR rebased against main (ignoring one unrelated flicker): #563

Copy link
Contributor

@jasonjkeller jasonjkeller left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants