|
|
@ -26,7 +26,7 @@ |
|
|
|
#include "absl/functional/any_invocable.h" |
|
|
|
#include "absl/functional/any_invocable.h" |
|
|
|
#include "absl/status/statusor.h" |
|
|
|
#include "absl/status/statusor.h" |
|
|
|
#include "absl/strings/string_view.h" |
|
|
|
#include "absl/strings/string_view.h" |
|
|
|
#include "opentelemetry/sdk/metrics/meter_provider.h" |
|
|
|
#include "opentelemetry/metrics/meter_provider.h" |
|
|
|
|
|
|
|
|
|
|
|
#include <grpcpp/ext/otel_plugin.h> |
|
|
|
#include <grpcpp/ext/otel_plugin.h> |
|
|
|
|
|
|
|
|
|
|
@ -40,7 +40,15 @@ namespace experimental { |
|
|
|
|
|
|
|
|
|
|
|
// This is a no-op at present, but in the future, this object would be useful
|
|
|
|
// This is a no-op at present, but in the future, this object would be useful
|
|
|
|
// for performing cleanup.
|
|
|
|
// for performing cleanup.
|
|
|
|
class CsmObservability {}; |
|
|
|
class CsmObservability { |
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
CsmObservability() = default; |
|
|
|
|
|
|
|
// Disable copy constructor and copy-assignment operator.
|
|
|
|
|
|
|
|
CsmObservability(const CsmObservability&) = delete; |
|
|
|
|
|
|
|
CsmObservability& operator=(const CsmObservability&) = delete; |
|
|
|
|
|
|
|
CsmObservability(CsmObservability&&) = default; |
|
|
|
|
|
|
|
CsmObservability& operator=(CsmObservability&&) = default; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// CsmObservabilityBuilder configures observability for all service mesh traffic
|
|
|
|
// CsmObservabilityBuilder configures observability for all service mesh traffic
|
|
|
|
// for a binary running on CSM.
|
|
|
|
// for a binary running on CSM.
|
|
|
@ -49,8 +57,7 @@ class CsmObservabilityBuilder { |
|
|
|
CsmObservabilityBuilder(); |
|
|
|
CsmObservabilityBuilder(); |
|
|
|
~CsmObservabilityBuilder(); |
|
|
|
~CsmObservabilityBuilder(); |
|
|
|
CsmObservabilityBuilder& SetMeterProvider( |
|
|
|
CsmObservabilityBuilder& SetMeterProvider( |
|
|
|
std::shared_ptr<opentelemetry::sdk::metrics::MeterProvider> |
|
|
|
std::shared_ptr<opentelemetry::metrics::MeterProvider> meter_provider); |
|
|
|
meter_provider); |
|
|
|
|
|
|
|
// If set, \a target_attribute_filter is called per channel to decide whether
|
|
|
|
// If set, \a target_attribute_filter is called per channel to decide whether
|
|
|
|
// to record the target attribute on client or to replace it with "other".
|
|
|
|
// to record the target attribute on client or to replace it with "other".
|
|
|
|
// This helps reduce the cardinality on metrics in cases where many channels
|
|
|
|
// This helps reduce the cardinality on metrics in cases where many channels
|
|
|
|