This repository was archived by the owner on Sep 17, 2025. It is now read-only.
Update grpc server_interceptor to report accurate timing#108
Merged
liyanhui1228 merged 3 commits intocensus-instrumentation:masterfrom Jan 25, 2018
Merged
Update grpc server_interceptor to report accurate timing#108liyanhui1228 merged 3 commits intocensus-instrumentation:masterfrom
liyanhui1228 merged 3 commits intocensus-instrumentation:masterfrom
Conversation
Contributor
liyanhui1228
left a comment
There was a problem hiding this comment.
LGTM except some nits. Please also fix the test coverage. Thank you for sending this PR!
| ATTRIBUTE_ERROR_MESSAGE = 'ERROR_MESSAGE' | ||
|
|
||
| RpcRequestInfo = collections.namedtuple('RPCRequestInfo', ('request', 'context')) | ||
| RpcResponseInfo = collections.namedtuple('RPCCallbackInfo', ('request', 'context', 'response', 'exc')) |
Contributor
There was a problem hiding this comment.
Please fix the lint warning that each line should be less than 79 characters.
|
|
||
| def __init__(self, handler, pre_handler_callbacks=None, post_handler_callbacks=None): | ||
| """ | ||
| :param handler: instance of RpcMethodHandler |
Contributor
There was a problem hiding this comment.
Please add one blank line between the param docstrings.
|
|
||
| from opencensus.trace import attributes_helper | ||
| from opencensus.trace import tracer as tracer_module | ||
| from opencensus.trace import tracer as tracer_module, execution_context |
Contributor
There was a problem hiding this comment.
Change this to two lines to import the tracer module and execution_context module separately.
liyanhui1228
approved these changes
Jan 25, 2018
Contributor
|
System tests are sometimes flaky which are not related to grpc integrations, merging for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #107. Updated my example to accept pre handler and post handler callbacks as requested. I also updated the code to set the tracer in the interceptor as the current tracer in the execution context.