|
|
@ -22,6 +22,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include <grpcpp/server_context.h> |
|
|
|
#include <grpcpp/server_context.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "opencensus/tags/tag_key.h" |
|
|
|
#include "opencensus/trace/span.h" |
|
|
|
#include "opencensus/trace/span.h" |
|
|
|
#include "src/cpp/ext/filters/census/channel_filter.h" |
|
|
|
#include "src/cpp/ext/filters/census/channel_filter.h" |
|
|
|
#include "src/cpp/ext/filters/census/client_filter.h" |
|
|
|
#include "src/cpp/ext/filters/census/client_filter.h" |
|
|
@ -33,27 +34,27 @@ namespace grpc { |
|
|
|
// These measure definitions should be kept in sync across opencensus
|
|
|
|
// These measure definitions should be kept in sync across opencensus
|
|
|
|
// implementations--see
|
|
|
|
// implementations--see
|
|
|
|
// https://github.com/census-instrumentation/opencensus-java/blob/master/contrib/grpc_metrics/src/main/java/io/opencensus/contrib/grpc/metrics/RpcMeasureConstants.java.
|
|
|
|
// https://github.com/census-instrumentation/opencensus-java/blob/master/contrib/grpc_metrics/src/main/java/io/opencensus/contrib/grpc/metrics/RpcMeasureConstants.java.
|
|
|
|
::opencensus::stats::TagKey ClientMethodTagKey() { |
|
|
|
::opencensus::tags::TagKey ClientMethodTagKey() { |
|
|
|
static const auto method_tag_key = |
|
|
|
static const auto method_tag_key = |
|
|
|
::opencensus::stats::TagKey::Register("grpc_client_method"); |
|
|
|
::opencensus::tags::TagKey::Register("grpc_client_method"); |
|
|
|
return method_tag_key; |
|
|
|
return method_tag_key; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
::opencensus::stats::TagKey ClientStatusTagKey() { |
|
|
|
::opencensus::tags::TagKey ClientStatusTagKey() { |
|
|
|
static const auto status_tag_key = |
|
|
|
static const auto status_tag_key = |
|
|
|
::opencensus::stats::TagKey::Register("grpc_client_status"); |
|
|
|
::opencensus::tags::TagKey::Register("grpc_client_status"); |
|
|
|
return status_tag_key; |
|
|
|
return status_tag_key; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
::opencensus::stats::TagKey ServerMethodTagKey() { |
|
|
|
::opencensus::tags::TagKey ServerMethodTagKey() { |
|
|
|
static const auto method_tag_key = |
|
|
|
static const auto method_tag_key = |
|
|
|
::opencensus::stats::TagKey::Register("grpc_server_method"); |
|
|
|
::opencensus::tags::TagKey::Register("grpc_server_method"); |
|
|
|
return method_tag_key; |
|
|
|
return method_tag_key; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
::opencensus::stats::TagKey ServerStatusTagKey() { |
|
|
|
::opencensus::tags::TagKey ServerStatusTagKey() { |
|
|
|
static const auto status_tag_key = |
|
|
|
static const auto status_tag_key = |
|
|
|
::opencensus::stats::TagKey::Register("grpc_server_status"); |
|
|
|
::opencensus::tags::TagKey::Register("grpc_server_status"); |
|
|
|
return status_tag_key; |
|
|
|
return status_tag_key; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|