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

Adding gRPC instrumentor #788

Merged
merged 36 commits into from
Jul 22, 2020
Merged

Adding gRPC instrumentor #788

merged 36 commits into from
Jul 22, 2020

Conversation

aravinsiva
Copy link
Contributor

@aravinsiva aravinsiva commented Jun 8, 2020

fixes #661

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 8, 2020

CLA Check
The committers are authorized under a signed CLA.

@aravinsiva aravinsiva marked this pull request as ready for review June 16, 2020 01:08
@aravinsiva aravinsiva requested a review from a team June 16, 2020 01:08
@aravinsiva aravinsiva changed the title Adding gRPC instrumentor [WIP] Adding gRPC instrumentor Jun 16, 2020
@aravinsiva aravinsiva changed the title Adding gRPC instrumentor Adding gRPC instrumentor [WIP] Jun 16, 2020
@aravinsiva aravinsiva changed the title Adding gRPC instrumentor [WIP] Adding gRPC instrumentor Jun 17, 2020
Copy link
Member

@cnnradams cnnradams left a comment

Choose a reason for hiding this comment

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

Looks like good progress from a first pass, but I think there is issues with auto-instrumentation wrt using _instrument to return the server/client instance instead of setting up a wrapper instead

Copy link
Member

@cnnradams cnnradams left a comment

Choose a reason for hiding this comment

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

LGTM other than needing to return server/client instead of setting self.server/self.client

ext/opentelemetry-ext-grpc/setup.cfg Outdated Show resolved Hide resolved
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

A couple of changes requested but overall it looks pretty good. Please update the CHANGELOG.md file as well.

ext/opentelemetry-ext-grpc/setup.cfg Outdated Show resolved Hide resolved
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Couple of changes requested, setup.cfg won't work as is, i added a suggestion. The test update would be nice but once the setup.cfg is updated, im happy to move to approve.

Co-authored-by: alrex <alrex.boten@gmail.com>
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Thanks for all the updates.

# pylint:disable=import-error
# pylint:disable=no-self-use
from contextlib import contextmanager

Copy link
Contributor

Choose a reason for hiding this comment

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

Some example code in the comments would be nice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added examples for both client and server

@cnnradams
Copy link
Member

can you update the grpc client tests (#896) to use this method instead of calling the interceptors themselves?

@lzchen lzchen merged commit 5ff9600 into open-telemetry:master Jul 22, 2020
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.

ext/grpc: Implement BaseInstrumentor interface
6 participants