diff options
author | ncteisen <ncteisen@gmail.com> | 2018-08-28 12:53:57 -0700 |
---|---|---|
committer | ncteisen <ncteisen@gmail.com> | 2018-08-28 12:53:57 -0700 |
commit | 4b5b019d5644affef122e06c6898811286850b8d (patch) | |
tree | 73c601dc31c436e3d800a846d08b9ace7ff05235 /include/grpcpp/opencensus.h | |
parent | b8f030bc0b507903e9d156fb44d161015273d0c6 (diff) | |
parent | ee65a5eaee45a765d1d4176a797bb8288faeb180 (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.h | 11 |
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 |