Revert "GcpObservability: Change default views provided (#31144)" (#31149)

This reverts commit dedcc7dbf6.
pull/31131/head
AJ Heller 2 years ago committed by GitHub
parent c222a0f035
commit 6fbff9c6a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/cpp/ext/gcp/BUILD
  2. 14
      src/cpp/ext/gcp/observability.cc

@ -41,7 +41,6 @@ grpc_cc_library(
"absl/status",
"absl/status:statusor",
"absl/types:optional",
"opencensus-stats",
"opencensus-trace",
"opencensus-trace-stackdriver_exporter",
"opencensus-stats-stackdriver_exporter",

@ -27,14 +27,12 @@
#include "absl/types/optional.h"
#include "opencensus/exporters/stats/stackdriver/stackdriver_exporter.h"
#include "opencensus/exporters/trace/stackdriver/stackdriver_exporter.h"
#include "opencensus/stats/stats.h"
#include "opencensus/trace/sampler.h"
#include "opencensus/trace/trace_config.h"
#include <grpcpp/opencensus.h>
#include <grpcpp/support/config.h>
#include "src/cpp/ext/filters/census/grpc_plugin.h"
#include "src/cpp/ext/gcp/observability_config.h"
namespace grpc {
@ -48,16 +46,6 @@ constexpr uint32_t kMaxAttributes = 128;
constexpr uint32_t kMaxAnnotations = 128;
constexpr uint32_t kMaxMessageEvents = 128;
constexpr uint32_t kMaxLinks = 128;
void RegisterOpenCensusViewsForGcpObservability() {
// Register client default views for GCP observability
ClientStartedRpcsCumulative().RegisterForExport();
ClientCompletedRpcsCumulative().RegisterForExport();
// Register server default views for GCP observability
ServerStartedRpcsCumulative().RegisterForExport();
ServerCompletedRpcsCumulative().RegisterForExport();
}
} // namespace
absl::Status GcpObservabilityInit() {
@ -66,7 +54,7 @@ absl::Status GcpObservabilityInit() {
return config.status();
}
grpc::RegisterOpenCensusPlugin();
RegisterOpenCensusViewsForGcpObservability();
grpc::RegisterOpenCensusViewsForExport();
if (config->cloud_trace.has_value()) {
opencensus::trace::TraceConfig::SetCurrentTraceParams(
{kMaxAttributes, kMaxAnnotations, kMaxMessageEvents, kMaxLinks,

Loading…
Cancel
Save