Skip to content
Snippets Groups Projects
Commit 7ee4b89d authored by Yang Gao's avatar Yang Gao
Browse files

Merge pull request #2670 from a-veitch/server_context

Server side census context plumbing for c++
parents 7d024c73 100a6e1d
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
struct gpr_timespec; struct gpr_timespec;
struct grpc_metadata; struct grpc_metadata;
struct grpc_call; struct grpc_call;
struct census_context;
namespace grpc { namespace grpc {
...@@ -116,6 +117,8 @@ class ServerContext { ...@@ -116,6 +117,8 @@ class ServerContext {
std::shared_ptr<const AuthContext> auth_context() const; std::shared_ptr<const AuthContext> auth_context() const;
const struct census_context* census_context() const;
private: private:
friend class ::grpc::testing::InteropContextInspector; friend class ::grpc::testing::InteropContextInspector;
friend class ::grpc::Server; friend class ::grpc::Server;
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <grpc++/impl/sync.h> #include <grpc++/impl/sync.h>
#include <grpc++/time.h> #include <grpc++/time.h>
#include "src/core/census/grpc_context.h"
#include "src/core/channel/compress_filter.h" #include "src/core/channel/compress_filter.h"
#include "src/cpp/common/create_auth_context.h" #include "src/cpp/common/create_auth_context.h"
...@@ -179,4 +180,8 @@ std::shared_ptr<const AuthContext> ServerContext::auth_context() const { ...@@ -179,4 +180,8 @@ std::shared_ptr<const AuthContext> ServerContext::auth_context() const {
return auth_context_; return auth_context_;
} }
const struct census_context* ServerContext::census_context() const {
return grpc_census_call_get_context(call_);
}
} // namespace grpc } // namespace grpc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment