Merge pull request #2670 from a-veitch/server_context

Server side census context plumbing for c++
pull/2131/head
Yang Gao 10 years ago
commit 7ee4b89d59
  1. 3
      include/grpc++/server_context.h
  2. 5
      src/cpp/server/server_context.cc

@ -46,6 +46,7 @@
struct gpr_timespec;
struct grpc_metadata;
struct grpc_call;
struct census_context;
namespace grpc {
@ -116,6 +117,8 @@ class ServerContext {
std::shared_ptr<const AuthContext> auth_context() const;
const struct census_context* census_context() const;
private:
friend class ::grpc::testing::InteropContextInspector;
friend class ::grpc::Server;

@ -39,6 +39,7 @@
#include <grpc++/impl/sync.h>
#include <grpc++/time.h>
#include "src/core/census/grpc_context.h"
#include "src/core/channel/compress_filter.h"
#include "src/cpp/common/create_auth_context.h"
@ -179,4 +180,8 @@ std::shared_ptr<const AuthContext> ServerContext::auth_context() const {
return auth_context_;
}
const struct census_context* ServerContext::census_context() const {
return grpc_census_call_get_context(call_);
}
} // namespace grpc

Loading…
Cancel
Save