aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@gmail.com>2018-03-16 07:55:43 -1000
committerGravatar GitHub <noreply@github.com>2018-03-16 07:55:43 -1000
commit1571abdb7f36041ad9dcba20690058b3614ea60a (patch)
treefae948ae4a371235e896ebe1d052f9b14438b057 /include
parent26655655a33d7c7944f271d1afc80789fb3b7fd9 (diff)
parent613d6327efeced1bea3baba1c19b2f287d4cb53e (diff)
Merge pull request #13883 from ncteisen/channel-tracing
Channel Tracing Implementation; Part 1
Diffstat (limited to 'include')
-rw-r--r--include/grpc/grpc.h8
-rw-r--r--include/grpc/impl/codegen/grpc_types.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index c129a66949..dd8a5d7d5f 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -286,6 +286,14 @@ GRPCAPI grpc_channel* grpc_lame_client_channel_create(
/** Close and destroy a grpc channel */
GRPCAPI void grpc_channel_destroy(grpc_channel* channel);
+/** Returns the JSON formatted channel trace for this channel. The caller
+ owns the returned string and is responsible for freeing it. */
+GRPCAPI char* grpc_channel_get_trace(grpc_channel* channel);
+
+/** Returns the channel uuid, which can be used to look up its trace at a
+ later time. */
+GRPCAPI intptr_t grpc_channel_get_uuid(grpc_channel* channel);
+
/** Error handling for grpc_call
Most grpc_call functions return a grpc_error. If the error is not GRPC_OK
then the operation failed due to some unsatisfied precondition.
diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h
index dcce2e7f9a..b671ad653e 100644
--- a/include/grpc/impl/codegen/grpc_types.h
+++ b/include/grpc/impl/codegen/grpc_types.h
@@ -281,6 +281,10 @@ typedef struct {
#define GRPC_ARG_SOCKET_MUTATOR "grpc.socket_mutator"
/** The grpc_socket_factory instance to create and bind sockets. A pointer. */
#define GRPC_ARG_SOCKET_FACTORY "grpc.socket_factory"
+/** The maximum number of trace events to keep in the tracer for each channel or
+ * subchannel. The default is 10. If set to 0, channel tracing is disabled. */
+#define GRPC_ARG_MAX_CHANNEL_TRACE_EVENTS_PER_NODE \
+ "grpc.max_channel_trace_events_per_node"
/** If non-zero, Cronet transport will coalesce packets to fewer frames
* when possible. */
#define GRPC_ARG_USE_CRONET_PACKET_COALESCING \