|
|
|
@ -60,8 +60,8 @@ static void extract_and_annotate_method_tag(grpc_metadata_batch *md, |
|
|
|
|
|
|
|
|
|
static void client_mutate_op(grpc_call_element *elem, |
|
|
|
|
grpc_transport_stream_op_batch *op) { |
|
|
|
|
call_data *calld = (call_data *) elem->call_data; |
|
|
|
|
channel_data *chand = (channel_data *) elem->channel_data; |
|
|
|
|
call_data *calld = (call_data *)elem->call_data; |
|
|
|
|
channel_data *chand = (channel_data *)elem->channel_data; |
|
|
|
|
if (op->send_initial_metadata) { |
|
|
|
|
extract_and_annotate_method_tag( |
|
|
|
|
op->payload->send_initial_metadata.send_initial_metadata, calld, chand); |
|
|
|
@ -78,9 +78,9 @@ static void client_start_transport_op(grpc_exec_ctx *exec_ctx, |
|
|
|
|
static void server_on_done_recv(grpc_exec_ctx *exec_ctx, void *ptr, |
|
|
|
|
grpc_error *error) { |
|
|
|
|
GPR_TIMER_BEGIN("census-server:server_on_done_recv", 0); |
|
|
|
|
grpc_call_element *elem = (grpc_call_element *) ptr; |
|
|
|
|
call_data *calld = (call_data *) elem->call_data; |
|
|
|
|
channel_data *chand = (channel_data *) elem->channel_data; |
|
|
|
|
grpc_call_element *elem = (grpc_call_element *)ptr; |
|
|
|
|
call_data *calld = (call_data *)elem->call_data; |
|
|
|
|
channel_data *chand = (channel_data *)elem->channel_data; |
|
|
|
|
if (error == GRPC_ERROR_NONE) { |
|
|
|
|
extract_and_annotate_method_tag(calld->recv_initial_metadata, calld, chand); |
|
|
|
|
} |
|
|
|
@ -90,7 +90,7 @@ static void server_on_done_recv(grpc_exec_ctx *exec_ctx, void *ptr, |
|
|
|
|
|
|
|
|
|
static void server_mutate_op(grpc_call_element *elem, |
|
|
|
|
grpc_transport_stream_op_batch *op) { |
|
|
|
|
call_data *calld = elem->call_data; |
|
|
|
|
call_data *calld = (call_data *)elem->call_data; |
|
|
|
|
if (op->recv_initial_metadata) { |
|
|
|
|
/* substitute our callback for the op callback */ |
|
|
|
|
calld->recv_initial_metadata = |
|
|
|
@ -117,7 +117,7 @@ static void server_start_transport_op(grpc_exec_ctx *exec_ctx, |
|
|
|
|
static grpc_error *client_init_call_elem(grpc_exec_ctx *exec_ctx, |
|
|
|
|
grpc_call_element *elem, |
|
|
|
|
const grpc_call_element_args *args) { |
|
|
|
|
call_data *d = elem->call_data; |
|
|
|
|
call_data *d = (call_data *)elem->call_data; |
|
|
|
|
GPR_ASSERT(d != NULL); |
|
|
|
|
memset(d, 0, sizeof(*d)); |
|
|
|
|
d->start_ts = args->start_time; |
|
|
|
@ -128,7 +128,7 @@ static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx, |
|
|
|
|
grpc_call_element *elem, |
|
|
|
|
const grpc_call_final_info *final_info, |
|
|
|
|
grpc_closure *ignored) { |
|
|
|
|
call_data *d = (call_data *) elem->call_data; |
|
|
|
|
call_data *d = (call_data *)elem->call_data; |
|
|
|
|
GPR_ASSERT(d != NULL); |
|
|
|
|
/* TODO(hongyu): record rpc client stats and census_rpc_end_op here */ |
|
|
|
|
} |
|
|
|
@ -136,7 +136,7 @@ static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx, |
|
|
|
|
static grpc_error *server_init_call_elem(grpc_exec_ctx *exec_ctx, |
|
|
|
|
grpc_call_element *elem, |
|
|
|
|
const grpc_call_element_args *args) { |
|
|
|
|
call_data *d = (call_data *) elem->call_data; |
|
|
|
|
call_data *d = (call_data *)elem->call_data; |
|
|
|
|
GPR_ASSERT(d != NULL); |
|
|
|
|
memset(d, 0, sizeof(*d)); |
|
|
|
|
d->start_ts = args->start_time; |
|
|
|
@ -150,7 +150,7 @@ static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, |
|
|
|
|
grpc_call_element *elem, |
|
|
|
|
const grpc_call_final_info *final_info, |
|
|
|
|
grpc_closure *ignored) { |
|
|
|
|
call_data *d = (call_data *) elem->call_data; |
|
|
|
|
call_data *d = (call_data *)elem->call_data; |
|
|
|
|
GPR_ASSERT(d != NULL); |
|
|
|
|
/* TODO(hongyu): record rpc server stats and census_tracing_end_op here */ |
|
|
|
|
} |
|
|
|
@ -158,14 +158,14 @@ static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, |
|
|
|
|
static grpc_error *init_channel_elem(grpc_exec_ctx *exec_ctx, |
|
|
|
|
grpc_channel_element *elem, |
|
|
|
|
grpc_channel_element_args *args) { |
|
|
|
|
channel_data *chand = (channel_data *) elem->channel_data; |
|
|
|
|
channel_data *chand = (channel_data *)elem->channel_data; |
|
|
|
|
GPR_ASSERT(chand != NULL); |
|
|
|
|
return GRPC_ERROR_NONE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, |
|
|
|
|
grpc_channel_element *elem) { |
|
|
|
|
channel_data *chand = (channel_data *) elem->channel_data; |
|
|
|
|
channel_data *chand = (channel_data *)elem->channel_data; |
|
|
|
|
GPR_ASSERT(chand != NULL); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|