-
Notifications
You must be signed in to change notification settings - Fork 219
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
GRPC Instrumentation #1703
GRPC Instrumentation #1703
Conversation
🌐 Coverage report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits and questions, but looks excellent overall!
docs/grpc.asciidoc
Outdated
|
||
|
||
Once you have configured the agent, it will automatically track transactions | ||
and capture uncaught exceptions within sanic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sanic
copy pasta
args[2] = interceptors | ||
else: | ||
kwargs["interceptors"] = interceptors | ||
return wrapper(*args, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a typo? Usually we use wrapped
not wrapper
, right?
Signed-off-by: Adrien Mannocci <adrien.mannocci@elastic.co>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work! 👍
What does this pull request do?
Instrument GRPC using interceptors. We use our instrumentation to insert our server and client interceptors, the interceptors take care of creating transactions and spans.
Testing is somewhat... interesting. We spawn a subprocess that runs the GRPC server, giving it the URL to our fake APM Server that runs in a thread of the main process. The GRPC client runs in the main thread. This allows for a full end-to-end test and introspection of all events (spans, transactions) from both the client and server.
Related issues
Closes #645