Move GetSpanFromServerContext() to public header.

pull/15984/head
easy 6 years ago
parent af74fc4bb0
commit 1b6e8514a9
  1. 7
      include/grpcpp/opencensus.h
  2. 4
      src/cpp/ext/filters/census/grpc_plugin.h

@ -19,6 +19,8 @@
#ifndef GRPCPP_OPENCENSUS_H
#define GRPCPP_OPENCENSUS_H
#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 +38,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

@ -24,15 +24,11 @@
#include "absl/strings/string_view.h"
#include "include/grpcpp/opencensus.h"
#include "opencensus/stats/stats.h"
#include "opencensus/trace/span.h"
namespace grpc {
class ServerContext;
// Returns the tracing Span for the current RPC.
::opencensus::trace::Span GetSpanFromServerContext(ServerContext* context);
// The tag keys set when recording RPC stats.
::opencensus::stats::TagKey ClientMethodTagKey();
::opencensus::stats::TagKey ClientStatusTagKey();

Loading…
Cancel
Save