aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpcpp/opencensus.h
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2018-08-28 12:53:57 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2018-08-28 12:53:57 -0700
commit4b5b019d5644affef122e06c6898811286850b8d (patch)
tree73c601dc31c436e3d800a846d08b9ace7ff05235 /include/grpcpp/opencensus.h
parentb8f030bc0b507903e9d156fb44d161015273d0c6 (diff)
parentee65a5eaee45a765d1d4176a797bb8288faeb180 (diff)
Merge branch 'master' of https://github.com/grpc/grpc into channelz-subchannels
Diffstat (limited to 'include/grpcpp/opencensus.h')
-rw-r--r--include/grpcpp/opencensus.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/grpcpp/opencensus.h b/include/grpcpp/opencensus.h
index 7e5d1dfeb4..07a1333986 100644
--- a/include/grpcpp/opencensus.h
+++ b/include/grpcpp/opencensus.h
@@ -19,6 +19,12 @@
#ifndef GRPCPP_OPENCENSUS_H
#define GRPCPP_OPENCENSUS_H
+#ifndef GRPC_BAZEL_BUILD
+#error OpenCensus for gRPC is only supported when building with bazel.
+#endif
+
+#include "opencensus/trace/span.h"
+
namespace grpc {
// These symbols in this file will not be included in the binary unless
// grpc_opencensus_plugin build target was added as a dependency. At the moment
@@ -36,6 +42,11 @@ void RegisterOpenCensusPlugin();
// ViewDescriptors below.
void RegisterOpenCensusViewsForExport();
+class ServerContext;
+
+// Returns the tracing Span for the current RPC.
+::opencensus::trace::Span GetSpanFromServerContext(ServerContext* context);
+
} // namespace grpc
#endif // GRPCPP_OPENCENSUS_H