|
|
|
@ -51,6 +51,8 @@ class CallTracer { |
|
|
|
|
virtual void RecordSendTrailingMetadata( |
|
|
|
|
grpc_metadata_batch* send_trailing_metadata) = 0; |
|
|
|
|
virtual void RecordSendMessage(const ByteStream& send_message) = 0; |
|
|
|
|
// The `RecordReceivedxx()` methods should only be invoked when the
|
|
|
|
|
// metadata/message was successfully received, i.e., without any error.
|
|
|
|
|
// TODO(yashkt): We are using gpr_atm here instead of absl::string_view
|
|
|
|
|
// since that's what the transport API uses, and performing an atomic load
|
|
|
|
|
// is unnecessary if the census tracer does not need it at present. Fix this
|
|
|
|
@ -62,9 +64,6 @@ class CallTracer { |
|
|
|
|
virtual void RecordReceivedTrailingMetadata( |
|
|
|
|
grpc_metadata_batch* recv_trailing_metadata) = 0; |
|
|
|
|
virtual void RecordCancel(grpc_error_handle cancel_error) = 0; |
|
|
|
|
// Records annotations if supported by the attached tracer library, no-op
|
|
|
|
|
// otherwise.
|
|
|
|
|
virtual void RecordAnnotation(absl::string_view annotation) = 0; |
|
|
|
|
// Should be the last API call to the object. Once invoked, the tracer
|
|
|
|
|
// library is free to destroy the object.
|
|
|
|
|
virtual void RecordEnd(const grpc_call_final_info& final_info) = 0; |
|
|
|
@ -74,15 +73,12 @@ class CallTracer { |
|
|
|
|
|
|
|
|
|
// Records a new attempt for the associated call. \a transparent denotes
|
|
|
|
|
// whether the attempt is being made as a transparent retry or as a
|
|
|
|
|
// non-transparent retry/heding attempt. (There will be atleast one attempt
|
|
|
|
|
// non-transparent retry/heding attempt. (There will be at least one attempt
|
|
|
|
|
// even if the call is not being retried.) The `CallTracer` object retains
|
|
|
|
|
// ownership to the newly created `CallAttemptTracer` object. RecordEnd()
|
|
|
|
|
// serves as an indication that the call stack is done with all API calls, and
|
|
|
|
|
// the tracer library is free to destroy it after that.
|
|
|
|
|
virtual CallAttemptTracer* StartNewAttempt(bool is_transparent_retry) = 0; |
|
|
|
|
// Records annotations if supported by the attached tracer library, no-op
|
|
|
|
|
// otherwise.
|
|
|
|
|
virtual void RecordAnnotation(absl::string_view annotation) = 0; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
} // namespace grpc_core
|
|
|
|
|