GCP Observability: Client attempt top latency (#32064)

pull/31700/head
Yash Tibrewal 2 years ago committed by GitHub
parent e312e9f307
commit 75f2a2c1c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      include/grpcpp/opencensus.h
  2. 10
      src/cpp/ext/filters/census/views.cc
  3. 1
      src/cpp/ext/gcp/observability.cc

@ -76,6 +76,7 @@ extern const absl::string_view kRpcServerStartedRpcsMeasureName;
// Canonical gRPC view definitions.
const ::opencensus::stats::ViewDescriptor& ClientStartedRpcs();
const ::opencensus::stats::ViewDescriptor& ClientCompletedRpcs();
const ::opencensus::stats::ViewDescriptor& ClientRoundtripLatency();
const ::opencensus::stats::ViewDescriptor&
ClientSentCompressedMessageBytesPerRpc();
const ::opencensus::stats::ViewDescriptor&

@ -110,6 +110,16 @@ const ViewDescriptor& ClientCompletedRpcs() {
return descriptor;
}
const ViewDescriptor& ClientRoundtripLatency() {
const static ViewDescriptor descriptor =
ViewDescriptor()
.set_name("grpc.io/client/roundtrip_latency")
.set_measure(kRpcClientRoundtripLatencyMeasureName)
.set_aggregation(MillisDistributionAggregation())
.add_column(ClientMethodTagKey());
return descriptor;
}
const ViewDescriptor& ClientSentCompressedMessageBytesPerRpc() {
const static ViewDescriptor descriptor =
ViewDescriptor()

@ -61,6 +61,7 @@ void RegisterOpenCensusViewsForGcpObservability() {
// Register client default views for GCP observability
ClientStartedRpcs().RegisterForExport();
ClientCompletedRpcs().RegisterForExport();
ClientRoundtripLatency().RegisterForExport();
ClientSentCompressedMessageBytesPerRpc().RegisterForExport();
ClientReceivedCompressedMessageBytesPerRpc().RegisterForExport();
// Register server default views for GCP observability

Loading…
Cancel
Save