diff --git a/observability/config.go b/observability/config.go new file mode 100644 index 000000000000..e058e637026f --- /dev/null +++ b/observability/config.go @@ -0,0 +1,97 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package observability + +import ( + "context" + "encoding/json" + "os" + + coptlogging "cloud.google.com/go/logging" + "golang.org/x/oauth2/google" + configpb "google.golang.org/grpc/observability/internal/config" + "google.golang.org/protobuf/encoding/protojson" +) + +const ( + envKeyObservabilityConfig = "GRPC_OBSERVABILITY_CONFIG" +) + +// gcpDefaultCredentials is the JSON loading struct used to get project id. +type gcpDefaultCredentials struct { + QuotaProjectID string `json:"quota_project_id"` +} + +// fetchDefaultProjectID fetches the default GCP project id from environment. +func fetchDefaultProjectID(ctx context.Context) string { + // Step 1: Check ENV var + if s := os.Getenv("GCLOUD_PROJECT_ID"); s != "" { + return s + } + // Step 2: Check default credential + if credentials, err := google.FindDefaultCredentials(ctx, coptlogging.WriteScope); err == nil { + logger.Infof("found Google Default Credential") + // Step 2.1: Check if the ProjectID is in the plain view + if credentials.ProjectID != "" { + return credentials.ProjectID + } else if len(credentials.JSON) > 0 { + // Step 2.2: Check if the JSON form of the credentials has it + var d gcpDefaultCredentials + if err := json.Unmarshal(credentials.JSON, &d); err != nil { + logger.Infof("failed to parse default credentials JSON") + } else if d.QuotaProjectID != "" { + return d.QuotaProjectID + } + } + } else { + logger.Info("failed to locate Google Default Credential: %v", err) + } + // No default project ID found + return "" +} + +// parseObservabilityConfig parses and processes the config for observability, +// currently, we only support loading config from static ENV var. But we might +// support dynamic configuration with control plane in future. +func parseObservabilityConfig(ctx context.Context) *configpb.ObservabilityConfig { + // Parse the config from ENV var + var config configpb.ObservabilityConfig + content := os.Getenv(envKeyObservabilityConfig) + if content != "" { + if err := protojson.Unmarshal([]byte(content), &config); err != nil { + logger.Warningf("failed to load observability config from env GRPC_OBSERVABILITY_CONFIG: %s", err) + } + } + // Fill in GCP project id if not present + if config.ExporterConfig == nil { + config.ExporterConfig = &configpb.ObservabilityConfig_ExporterConfig{ + ProjectId: fetchDefaultProjectID(ctx), + } + } else { + // If any default exporter is required, fill the default project id + if !config.ExporterConfig.DisableDefaultLoggingExporter || !config.ExporterConfig.DisableDefaultTracingExporter || !config.ExporterConfig.DisableDefaultMetricsExporter { + if config.ExporterConfig.ProjectId == "" { + config.ExporterConfig.ProjectId = fetchDefaultProjectID(ctx) + } + } + } + configJSON, _ := protojson.Marshal(&config) + logger.Infof("Using ObservabilityConfig: %v", string(configJSON)) + return &config +} diff --git a/observability/exporting.go b/observability/exporting.go new file mode 100644 index 000000000000..8526e043ec88 --- /dev/null +++ b/observability/exporting.go @@ -0,0 +1,147 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package observability + +import ( + "context" + "encoding/json" + + coptlogging "cloud.google.com/go/logging" + grpclogrecordpb "google.golang.org/grpc/observability/internal/logging" + "google.golang.org/protobuf/encoding/protojson" +) + +// genericLoggingExporter is the interface of logging exporter for gRPC +// Observability. Ideally, we should use what OTEL provides, but their Golang +// implementation is in "frozen" state. So, this plugin provides a minimum +// interface to satisfy testing purposes. +type genericLoggingExporter interface { + // EmitGrpcLogRecord writes a gRPC LogRecord to cache without blocking. + EmitGrpcLogRecord(*grpclogrecordpb.GrpcLogRecord) + // Close flushes all pending data and closes the exporter. + Close() error +} + +var ( + // loggingExporter is the global logging exporter, may be nil. + loggingExporter genericLoggingExporter +) + +// cloudLoggingExporter is the exporter for CloudLogging. +type cloudLoggingExporter struct { + client *coptlogging.Client + logger *coptlogging.Logger +} + +func newCloudLoggingExporter(ctx context.Context, projectID string) *cloudLoggingExporter { + c, err := coptlogging.NewClient(ctx, projectID) + if err != nil { + logger.Errorf("failed to create cloudLoggingExporter: %v", err) + return nil + } + logger.Infof("successfully created cloudLoggingExporter") + return &cloudLoggingExporter{ + client: c, + logger: c.Logger("observability"), + } +} + +// mapLogLevelToSeverity maps the gRPC defined log level to Cloud Logging's +// Severity. The canonical definition can be found at +// https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity. +func mapLogLevelToSeverity(l grpclogrecordpb.GrpcLogRecord_LogLevel) coptlogging.Severity { + switch l { + case grpclogrecordpb.GrpcLogRecord_LOG_LEVEL_UNKNOWN: + return 0 + case grpclogrecordpb.GrpcLogRecord_LOG_LEVEL_TRACE: + // Cloud Logging doesn't have a trace level, treated as DEBUG. + return 100 + case grpclogrecordpb.GrpcLogRecord_LOG_LEVEL_DEBUG: + return 100 + case grpclogrecordpb.GrpcLogRecord_LOG_LEVEL_INFO: + return 200 + case grpclogrecordpb.GrpcLogRecord_LOG_LEVEL_WARN: + return 400 + case grpclogrecordpb.GrpcLogRecord_LOG_LEVEL_ERROR: + return 500 + case grpclogrecordpb.GrpcLogRecord_LOG_LEVEL_CRITICAL: + return 600 + default: + logger.Errorf("unknown LogLevel: %v", l) + return -1 + } +} + +func (cle *cloudLoggingExporter) EmitGrpcLogRecord(l *grpclogrecordpb.GrpcLogRecord) { + body, err := protojson.Marshal(l) + if err != nil { + logger.Errorf("failed to marshal GrpcLogRecord: %v", l) + return + } + entry := coptlogging.Entry{ + Timestamp: l.Timestamp.AsTime(), + Severity: mapLogLevelToSeverity(l.LogLevel), + Payload: string(body), + } + cle.logger.Log(entry) + if logger.V(2) { + eventJSON, _ := json.Marshal(&entry) + logger.Infof("Uploading event to CloudLogging: %s", eventJSON) + } +} + +func (cle *cloudLoggingExporter) Close() error { + if cle.logger != nil { + if err := cle.logger.Flush(); err != nil { + return err + } + } + if cle.client != nil { + if err := cle.client.Close(); err != nil { + return err + } + } + logger.Infof("closed CloudLogging exporter") + return nil +} + +func createDefaultLoggingExporter(ctx context.Context, projectID string) { + loggingExporter = newCloudLoggingExporter(ctx, projectID) +} + +func closeLoggingExporter() { + if loggingExporter != nil { + if err := loggingExporter.Close(); err != nil { + logger.Infof("failed to close logging exporter: %v", err) + } + } +} + +// registerLoggingExporter allows custom logging exporter, currently only +// available to testing inside this package. +func registerLoggingExporter(e genericLoggingExporter) { + loggingExporter = e +} + +// Emit is the wrapper for producing a log entry, hiding all the abstraction details. +func Emit(l *grpclogrecordpb.GrpcLogRecord) { + if loggingExporter != nil { + loggingExporter.EmitGrpcLogRecord(l) + } +} diff --git a/observability/go.mod b/observability/go.mod new file mode 100644 index 000000000000..4cea246e8b49 --- /dev/null +++ b/observability/go.mod @@ -0,0 +1,14 @@ +module google.golang.org/grpc/observability + +go 1.14 + +require ( + cloud.google.com/go/logging v1.4.2 + github.com/golang/protobuf v1.5.2 + github.com/google/go-cmp v0.5.6 // indirect + golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 + google.golang.org/grpc v1.43.0 + google.golang.org/protobuf v1.27.1 +) + +replace google.golang.org/grpc => ../ diff --git a/observability/go.sum b/observability/go.sum new file mode 100644 index 000000000000..872757b84ceb --- /dev/null +++ b/observability/go.sum @@ -0,0 +1,460 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/logging v1.4.2 h1:Mu2Q75VBDQlW1HlBMjTX4X84UFR73G1TiLlRYc/b7tA= +cloud.google.com/go/logging v1.4.2/go.mod h1:jco9QZSx8HiVVqLJReq7z7bVdj0P1Jb9PDFs63T+axo= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420 h1:a8jGStKg0XqKDlKqjLrXn0ioF5MH36pT7Z0BRTqLhbk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324 h1:pAwJxDByZctfPwzlNGrDN2BQLsdPb9NkhoTJtUkAO28= +golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.46.0 h1:jkDWHOBIoNSD0OQpq4rtBVu+Rh325MPjXG1rakAp8JU= +google.golang.org/api v0.46.0/go.mod h1:ceL4oozhkAiTID8XMmJBsIxID/9wMXJVVFXPg4ylg3I= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210429181445-86c259c2b4ab/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210517163617-5e0236093d7a h1:VA0wtJaR+W1I11P2f535J7D/YxyvEFMTMvcmyeZ9FBE= +google.golang.org/genproto v0.0.0-20210517163617-5e0236093d7a/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/observability/internal/config/config.pb.go b/observability/internal/config/config.pb.go new file mode 100644 index 000000000000..b82833c999b2 --- /dev/null +++ b/observability/internal/config/config.pb.go @@ -0,0 +1,1145 @@ +// Copyright 2022 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Observability Config is used by gRPC Observability plugin to control provided +// observability features. It contains parameters to enable/disable certain +// features, or fine tune the verbosity. +// +// Note that gRPC may use this config in JSON form, not in protobuf form. This +// proto definition is intended to help document the schema but might not +// actually be used directly by gRPC. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: observability/internal/config/config.proto + +package config + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Sampler struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Sampler: + // *Sampler_RateLimiting + // *Sampler_Probabilistic + // *Sampler_Always + // *Sampler_Never + Sampler isSampler_Sampler `protobuf_oneof:"sampler"` +} + +func (x *Sampler) Reset() { + *x = Sampler{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Sampler) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Sampler) ProtoMessage() {} + +func (x *Sampler) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Sampler.ProtoReflect.Descriptor instead. +func (*Sampler) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{0} +} + +func (m *Sampler) GetSampler() isSampler_Sampler { + if m != nil { + return m.Sampler + } + return nil +} + +func (x *Sampler) GetRateLimiting() *Sampler_RateLimitingSampler { + if x, ok := x.GetSampler().(*Sampler_RateLimiting); ok { + return x.RateLimiting + } + return nil +} + +func (x *Sampler) GetProbabilistic() *Sampler_ProbabilisticSampler { + if x, ok := x.GetSampler().(*Sampler_Probabilistic); ok { + return x.Probabilistic + } + return nil +} + +func (x *Sampler) GetAlways() *Sampler_AlwaysSampler { + if x, ok := x.GetSampler().(*Sampler_Always); ok { + return x.Always + } + return nil +} + +func (x *Sampler) GetNever() *Sampler_NeverSampler { + if x, ok := x.GetSampler().(*Sampler_Never); ok { + return x.Never + } + return nil +} + +type isSampler_Sampler interface { + isSampler_Sampler() +} + +type Sampler_RateLimiting struct { + RateLimiting *Sampler_RateLimitingSampler `protobuf:"bytes,1,opt,name=rate_limiting,json=rateLimiting,proto3,oneof"` +} + +type Sampler_Probabilistic struct { + Probabilistic *Sampler_ProbabilisticSampler `protobuf:"bytes,2,opt,name=probabilistic,proto3,oneof"` +} + +type Sampler_Always struct { + Always *Sampler_AlwaysSampler `protobuf:"bytes,3,opt,name=always,proto3,oneof"` +} + +type Sampler_Never struct { + Never *Sampler_NeverSampler `protobuf:"bytes,4,opt,name=never,proto3,oneof"` +} + +func (*Sampler_RateLimiting) isSampler_Sampler() {} + +func (*Sampler_Probabilistic) isSampler_Sampler() {} + +func (*Sampler_Always) isSampler_Sampler() {} + +func (*Sampler_Never) isSampler_Sampler() {} + +// Configuration for observability behaviors. By default, no configuration is +// required for tracing/metrics/logging to function. This config captures the +// most common knobs for gRPC users. It's always possible to override with +// explicit config in code. +type ObservabilityConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Controls the exporter behavior + ExporterConfig *ObservabilityConfig_ExporterConfig `protobuf:"bytes,1,opt,name=exporter_config,json=exporterConfig,proto3" json:"exporter_config,omitempty"` + // Controls the tracing behavior + TracingConfig *ObservabilityConfig_TracingConfig `protobuf:"bytes,2,opt,name=tracing_config,json=tracingConfig,proto3" json:"tracing_config,omitempty"` + // Controls the metrics behavior + MetricsConfig *ObservabilityConfig_MetricsConfig `protobuf:"bytes,3,opt,name=metrics_config,json=metricsConfig,proto3" json:"metrics_config,omitempty"` + // Controls the logging behavior + LoggingConfig *ObservabilityConfig_LoggingConfig `protobuf:"bytes,4,opt,name=logging_config,json=loggingConfig,proto3" json:"logging_config,omitempty"` + // Controls the enhanced behavior for specific deployment environment + DeploymentConfig *ObservabilityConfig_DeploymentConfig `protobuf:"bytes,5,opt,name=deployment_config,json=deploymentConfig,proto3" json:"deployment_config,omitempty"` +} + +func (x *ObservabilityConfig) Reset() { + *x = ObservabilityConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObservabilityConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObservabilityConfig) ProtoMessage() {} + +func (x *ObservabilityConfig) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObservabilityConfig.ProtoReflect.Descriptor instead. +func (*ObservabilityConfig) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{1} +} + +func (x *ObservabilityConfig) GetExporterConfig() *ObservabilityConfig_ExporterConfig { + if x != nil { + return x.ExporterConfig + } + return nil +} + +func (x *ObservabilityConfig) GetTracingConfig() *ObservabilityConfig_TracingConfig { + if x != nil { + return x.TracingConfig + } + return nil +} + +func (x *ObservabilityConfig) GetMetricsConfig() *ObservabilityConfig_MetricsConfig { + if x != nil { + return x.MetricsConfig + } + return nil +} + +func (x *ObservabilityConfig) GetLoggingConfig() *ObservabilityConfig_LoggingConfig { + if x != nil { + return x.LoggingConfig + } + return nil +} + +func (x *ObservabilityConfig) GetDeploymentConfig() *ObservabilityConfig_DeploymentConfig { + if x != nil { + return x.DeploymentConfig + } + return nil +} + +// RateLimitingSampler enforces the average data collection intervals +// between calls. +type Sampler_RateLimitingSampler struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The default sample interval is 10s. + SampleInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=sample_interval,json=sampleInterval,proto3" json:"sample_interval,omitempty"` +} + +func (x *Sampler_RateLimitingSampler) Reset() { + *x = Sampler_RateLimitingSampler{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Sampler_RateLimitingSampler) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Sampler_RateLimitingSampler) ProtoMessage() {} + +func (x *Sampler_RateLimitingSampler) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Sampler_RateLimitingSampler.ProtoReflect.Descriptor instead. +func (*Sampler_RateLimitingSampler) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Sampler_RateLimitingSampler) GetSampleInterval() *durationpb.Duration { + if x != nil { + return x.SampleInterval + } + return nil +} + +// ProbabilisticSampler picks calls via straightforward probability. +type Sampler_ProbabilisticSampler struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The default tracing rate is 0.1. + RateNumerator uint32 `protobuf:"varint,1,opt,name=rate_numerator,json=rateNumerator,proto3" json:"rate_numerator,omitempty"` + RateDenominator uint32 `protobuf:"varint,2,opt,name=rate_denominator,json=rateDenominator,proto3" json:"rate_denominator,omitempty"` +} + +func (x *Sampler_ProbabilisticSampler) Reset() { + *x = Sampler_ProbabilisticSampler{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Sampler_ProbabilisticSampler) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Sampler_ProbabilisticSampler) ProtoMessage() {} + +func (x *Sampler_ProbabilisticSampler) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Sampler_ProbabilisticSampler.ProtoReflect.Descriptor instead. +func (*Sampler_ProbabilisticSampler) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Sampler_ProbabilisticSampler) GetRateNumerator() uint32 { + if x != nil { + return x.RateNumerator + } + return 0 +} + +func (x *Sampler_ProbabilisticSampler) GetRateDenominator() uint32 { + if x != nil { + return x.RateDenominator + } + return 0 +} + +// AlwaysSampler picks every call. +type Sampler_AlwaysSampler struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Sampler_AlwaysSampler) Reset() { + *x = Sampler_AlwaysSampler{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Sampler_AlwaysSampler) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Sampler_AlwaysSampler) ProtoMessage() {} + +func (x *Sampler_AlwaysSampler) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Sampler_AlwaysSampler.ProtoReflect.Descriptor instead. +func (*Sampler_AlwaysSampler) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{0, 2} +} + +// NeverSampler disables sampling. +type Sampler_NeverSampler struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Sampler_NeverSampler) Reset() { + *x = Sampler_NeverSampler{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Sampler_NeverSampler) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Sampler_NeverSampler) ProtoMessage() {} + +func (x *Sampler_NeverSampler) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Sampler_NeverSampler.ProtoReflect.Descriptor instead. +func (*Sampler_NeverSampler) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{0, 3} +} + +type ObservabilityConfig_ExporterConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Following options turn off the default exporters, this allows + // applications to use custom exporters without duplicated uploads. + DisableDefaultTracingExporter bool `protobuf:"varint,1,opt,name=disable_default_tracing_exporter,json=disableDefaultTracingExporter,proto3" json:"disable_default_tracing_exporter,omitempty"` + DisableDefaultMetricsExporter bool `protobuf:"varint,2,opt,name=disable_default_metrics_exporter,json=disableDefaultMetricsExporter,proto3" json:"disable_default_metrics_exporter,omitempty"` + DisableDefaultLoggingExporter bool `protobuf:"varint,3,opt,name=disable_default_logging_exporter,json=disableDefaultLoggingExporter,proto3" json:"disable_default_logging_exporter,omitempty"` + // The project identifier. + ProjectId string `protobuf:"bytes,4,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + // The reporting interval for all observability data for default exporters. + ReportingInterval *durationpb.Duration `protobuf:"bytes,5,opt,name=reporting_interval,json=reportingInterval,proto3" json:"reporting_interval,omitempty"` +} + +func (x *ObservabilityConfig_ExporterConfig) Reset() { + *x = ObservabilityConfig_ExporterConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObservabilityConfig_ExporterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObservabilityConfig_ExporterConfig) ProtoMessage() {} + +func (x *ObservabilityConfig_ExporterConfig) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObservabilityConfig_ExporterConfig.ProtoReflect.Descriptor instead. +func (*ObservabilityConfig_ExporterConfig) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *ObservabilityConfig_ExporterConfig) GetDisableDefaultTracingExporter() bool { + if x != nil { + return x.DisableDefaultTracingExporter + } + return false +} + +func (x *ObservabilityConfig_ExporterConfig) GetDisableDefaultMetricsExporter() bool { + if x != nil { + return x.DisableDefaultMetricsExporter + } + return false +} + +func (x *ObservabilityConfig_ExporterConfig) GetDisableDefaultLoggingExporter() bool { + if x != nil { + return x.DisableDefaultLoggingExporter + } + return false +} + +func (x *ObservabilityConfig_ExporterConfig) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *ObservabilityConfig_ExporterConfig) GetReportingInterval() *durationpb.Duration { + if x != nil { + return x.ReportingInterval + } + return nil +} + +type ObservabilityConfig_TracingConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Defines the sampling algorithm and behavior. The default sampler is + // RateLimitingSampler with 10s interval. + Sampler *Sampler `protobuf:"bytes,1,opt,name=sampler,proto3" json:"sampler,omitempty"` +} + +func (x *ObservabilityConfig_TracingConfig) Reset() { + *x = ObservabilityConfig_TracingConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObservabilityConfig_TracingConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObservabilityConfig_TracingConfig) ProtoMessage() {} + +func (x *ObservabilityConfig_TracingConfig) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObservabilityConfig_TracingConfig.ProtoReflect.Descriptor instead. +func (*ObservabilityConfig_TracingConfig) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *ObservabilityConfig_TracingConfig) GetSampler() *Sampler { + if x != nil { + return x.Sampler + } + return nil +} + +type ObservabilityConfig_MetricsConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ObservabilityConfig_MetricsConfig) Reset() { + *x = ObservabilityConfig_MetricsConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObservabilityConfig_MetricsConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObservabilityConfig_MetricsConfig) ProtoMessage() {} + +func (x *ObservabilityConfig_MetricsConfig) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObservabilityConfig_MetricsConfig.ProtoReflect.Descriptor instead. +func (*ObservabilityConfig_MetricsConfig) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{1, 2} +} + +type ObservabilityConfig_LoggingConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of method config. The order matters here - the first pattern which + // matches the current method will apply the associated config options in + // the LogFilter. Any other LogFilter that also matches that comes later + // will be ignored. So a LogFilter of "*/*" should appear last in this list. + LogFilters []*ObservabilityConfig_LoggingConfig_LogFilter `protobuf:"bytes,1,rep,name=log_filters,json=logFilters,proto3" json:"log_filters,omitempty"` +} + +func (x *ObservabilityConfig_LoggingConfig) Reset() { + *x = ObservabilityConfig_LoggingConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObservabilityConfig_LoggingConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObservabilityConfig_LoggingConfig) ProtoMessage() {} + +func (x *ObservabilityConfig_LoggingConfig) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObservabilityConfig_LoggingConfig.ProtoReflect.Descriptor instead. +func (*ObservabilityConfig_LoggingConfig) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{1, 3} +} + +func (x *ObservabilityConfig_LoggingConfig) GetLogFilters() []*ObservabilityConfig_LoggingConfig_LogFilter { + if x != nil { + return x.LogFilters + } + return nil +} + +type ObservabilityConfig_DeploymentConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ObservabilityConfig_DeploymentConfig) Reset() { + *x = ObservabilityConfig_DeploymentConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObservabilityConfig_DeploymentConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObservabilityConfig_DeploymentConfig) ProtoMessage() {} + +func (x *ObservabilityConfig_DeploymentConfig) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObservabilityConfig_DeploymentConfig.ProtoReflect.Descriptor instead. +func (*ObservabilityConfig_DeploymentConfig) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{1, 4} +} + +type ObservabilityConfig_LoggingConfig_LogFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A string which can select a group of method names. Only "*" wildcard + // is accepted. + // Examples: + // - "Foo/Bar" selects only the method "Bar" from service "Foo" + // - "Foo/*" selects all methods from service "Foo" + // - "*/*" selects all methods from all services. + Pattern string `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"` + // Number of bytes of each header to log. If the size of the header is + // greater than the defined limit, content pass the limit will be + // truncated. The default value is 0. + HeaderBytes int32 `protobuf:"varint,2,opt,name=header_bytes,json=headerBytes,proto3" json:"header_bytes,omitempty"` + // Number of bytes of each message to log. If the size of the message is + // greater than the defined limit, content pass the limit will be + // truncated. The default value is 0. + MessageBytes int32 `protobuf:"varint,3,opt,name=message_bytes,json=messageBytes,proto3" json:"message_bytes,omitempty"` + // Attachs a sampler to this group of methods. The default sampler is + // AlwaysSampler. + Sampler *Sampler `protobuf:"bytes,4,opt,name=sampler,proto3" json:"sampler,omitempty"` +} + +func (x *ObservabilityConfig_LoggingConfig_LogFilter) Reset() { + *x = ObservabilityConfig_LoggingConfig_LogFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_config_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ObservabilityConfig_LoggingConfig_LogFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ObservabilityConfig_LoggingConfig_LogFilter) ProtoMessage() {} + +func (x *ObservabilityConfig_LoggingConfig_LogFilter) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_config_config_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ObservabilityConfig_LoggingConfig_LogFilter.ProtoReflect.Descriptor instead. +func (*ObservabilityConfig_LoggingConfig_LogFilter) Descriptor() ([]byte, []int) { + return file_observability_internal_config_config_proto_rawDescGZIP(), []int{1, 3, 0} +} + +func (x *ObservabilityConfig_LoggingConfig_LogFilter) GetPattern() string { + if x != nil { + return x.Pattern + } + return "" +} + +func (x *ObservabilityConfig_LoggingConfig_LogFilter) GetHeaderBytes() int32 { + if x != nil { + return x.HeaderBytes + } + return 0 +} + +func (x *ObservabilityConfig_LoggingConfig_LogFilter) GetMessageBytes() int32 { + if x != nil { + return x.MessageBytes + } + return 0 +} + +func (x *ObservabilityConfig_LoggingConfig_LogFilter) GetSampler() *Sampler { + if x != nil { + return x.Sampler + } + return nil +} + +var File_observability_internal_config_config_proto protoreflect.FileDescriptor + +var file_observability_internal_config_config_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, + 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xef, 0x04, 0x0a, 0x07, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x12, 0x65, 0x0a, 0x0d, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x69, + 0x6e, 0x67, 0x12, 0x67, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x73, + 0x74, 0x69, 0x63, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x72, + 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x63, 0x12, 0x52, 0x0a, 0x06, 0x61, + 0x6c, 0x77, 0x61, 0x79, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x53, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x12, + 0x4f, 0x0a, 0x05, 0x6e, 0x65, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x65, 0x76, 0x65, 0x72, + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6e, 0x65, 0x76, 0x65, 0x72, + 0x1a, 0x59, 0x0a, 0x13, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0f, 0x73, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x1a, 0x68, 0x0a, 0x14, 0x50, + 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x73, 0x74, 0x69, 0x63, 0x53, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x72, 0x61, 0x74, + 0x65, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x61, + 0x74, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x0f, 0x0a, 0x0d, 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x53, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x1a, 0x0e, 0x0a, 0x0c, 0x4e, 0x65, 0x76, 0x65, 0x72, 0x53, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x72, 0x22, 0xce, 0x0a, 0x0a, 0x13, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6e, 0x0a, 0x0f, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6b, 0x0a, 0x0e, 0x74, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x44, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, + 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6b, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x6b, 0x0a, 0x0e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0d, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x74, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xd4, 0x02, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x47, 0x0a, 0x20, 0x64, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x74, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x1d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x72, 0x12, 0x47, 0x0a, 0x20, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x65, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x20, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6c, + 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x1a, 0x55, 0x0a, + 0x0d, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, + 0x0a, 0x07, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x52, 0x07, 0x73, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x72, 0x1a, 0x0f, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xb6, 0x02, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, + 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6f, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x5f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x6c, 0x6f, + 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x1a, 0xb3, 0x01, 0x0a, 0x09, 0x4c, 0x6f, 0x67, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x12, 0x21, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x52, 0x07, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x1a, 0x12, + 0x0a, 0x10, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x70, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x18, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_observability_internal_config_config_proto_rawDescOnce sync.Once + file_observability_internal_config_config_proto_rawDescData = file_observability_internal_config_config_proto_rawDesc +) + +func file_observability_internal_config_config_proto_rawDescGZIP() []byte { + file_observability_internal_config_config_proto_rawDescOnce.Do(func() { + file_observability_internal_config_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_observability_internal_config_config_proto_rawDescData) + }) + return file_observability_internal_config_config_proto_rawDescData +} + +var file_observability_internal_config_config_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_observability_internal_config_config_proto_goTypes = []interface{}{ + (*Sampler)(nil), // 0: grpc.observability.config.v1alpha.Sampler + (*ObservabilityConfig)(nil), // 1: grpc.observability.config.v1alpha.ObservabilityConfig + (*Sampler_RateLimitingSampler)(nil), // 2: grpc.observability.config.v1alpha.Sampler.RateLimitingSampler + (*Sampler_ProbabilisticSampler)(nil), // 3: grpc.observability.config.v1alpha.Sampler.ProbabilisticSampler + (*Sampler_AlwaysSampler)(nil), // 4: grpc.observability.config.v1alpha.Sampler.AlwaysSampler + (*Sampler_NeverSampler)(nil), // 5: grpc.observability.config.v1alpha.Sampler.NeverSampler + (*ObservabilityConfig_ExporterConfig)(nil), // 6: grpc.observability.config.v1alpha.ObservabilityConfig.ExporterConfig + (*ObservabilityConfig_TracingConfig)(nil), // 7: grpc.observability.config.v1alpha.ObservabilityConfig.TracingConfig + (*ObservabilityConfig_MetricsConfig)(nil), // 8: grpc.observability.config.v1alpha.ObservabilityConfig.MetricsConfig + (*ObservabilityConfig_LoggingConfig)(nil), // 9: grpc.observability.config.v1alpha.ObservabilityConfig.LoggingConfig + (*ObservabilityConfig_DeploymentConfig)(nil), // 10: grpc.observability.config.v1alpha.ObservabilityConfig.DeploymentConfig + (*ObservabilityConfig_LoggingConfig_LogFilter)(nil), // 11: grpc.observability.config.v1alpha.ObservabilityConfig.LoggingConfig.LogFilter + (*durationpb.Duration)(nil), // 12: google.protobuf.Duration +} +var file_observability_internal_config_config_proto_depIdxs = []int32{ + 2, // 0: grpc.observability.config.v1alpha.Sampler.rate_limiting:type_name -> grpc.observability.config.v1alpha.Sampler.RateLimitingSampler + 3, // 1: grpc.observability.config.v1alpha.Sampler.probabilistic:type_name -> grpc.observability.config.v1alpha.Sampler.ProbabilisticSampler + 4, // 2: grpc.observability.config.v1alpha.Sampler.always:type_name -> grpc.observability.config.v1alpha.Sampler.AlwaysSampler + 5, // 3: grpc.observability.config.v1alpha.Sampler.never:type_name -> grpc.observability.config.v1alpha.Sampler.NeverSampler + 6, // 4: grpc.observability.config.v1alpha.ObservabilityConfig.exporter_config:type_name -> grpc.observability.config.v1alpha.ObservabilityConfig.ExporterConfig + 7, // 5: grpc.observability.config.v1alpha.ObservabilityConfig.tracing_config:type_name -> grpc.observability.config.v1alpha.ObservabilityConfig.TracingConfig + 8, // 6: grpc.observability.config.v1alpha.ObservabilityConfig.metrics_config:type_name -> grpc.observability.config.v1alpha.ObservabilityConfig.MetricsConfig + 9, // 7: grpc.observability.config.v1alpha.ObservabilityConfig.logging_config:type_name -> grpc.observability.config.v1alpha.ObservabilityConfig.LoggingConfig + 10, // 8: grpc.observability.config.v1alpha.ObservabilityConfig.deployment_config:type_name -> grpc.observability.config.v1alpha.ObservabilityConfig.DeploymentConfig + 12, // 9: grpc.observability.config.v1alpha.Sampler.RateLimitingSampler.sample_interval:type_name -> google.protobuf.Duration + 12, // 10: grpc.observability.config.v1alpha.ObservabilityConfig.ExporterConfig.reporting_interval:type_name -> google.protobuf.Duration + 0, // 11: grpc.observability.config.v1alpha.ObservabilityConfig.TracingConfig.sampler:type_name -> grpc.observability.config.v1alpha.Sampler + 11, // 12: grpc.observability.config.v1alpha.ObservabilityConfig.LoggingConfig.log_filters:type_name -> grpc.observability.config.v1alpha.ObservabilityConfig.LoggingConfig.LogFilter + 0, // 13: grpc.observability.config.v1alpha.ObservabilityConfig.LoggingConfig.LogFilter.sampler:type_name -> grpc.observability.config.v1alpha.Sampler + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_observability_internal_config_config_proto_init() } +func file_observability_internal_config_config_proto_init() { + if File_observability_internal_config_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_observability_internal_config_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Sampler); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_config_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObservabilityConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_config_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Sampler_RateLimitingSampler); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_config_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Sampler_ProbabilisticSampler); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_config_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Sampler_AlwaysSampler); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_config_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Sampler_NeverSampler); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_config_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObservabilityConfig_ExporterConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_config_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObservabilityConfig_TracingConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_config_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObservabilityConfig_MetricsConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_config_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObservabilityConfig_LoggingConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_config_config_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObservabilityConfig_DeploymentConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_config_config_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ObservabilityConfig_LoggingConfig_LogFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_observability_internal_config_config_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Sampler_RateLimiting)(nil), + (*Sampler_Probabilistic)(nil), + (*Sampler_Always)(nil), + (*Sampler_Never)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_observability_internal_config_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_observability_internal_config_config_proto_goTypes, + DependencyIndexes: file_observability_internal_config_config_proto_depIdxs, + MessageInfos: file_observability_internal_config_config_proto_msgTypes, + }.Build() + File_observability_internal_config_config_proto = out.File + file_observability_internal_config_config_proto_rawDesc = nil + file_observability_internal_config_config_proto_goTypes = nil + file_observability_internal_config_config_proto_depIdxs = nil +} diff --git a/observability/internal/config/config.proto b/observability/internal/config/config.proto new file mode 100644 index 000000000000..d94fafa87949 --- /dev/null +++ b/observability/internal/config/config.proto @@ -0,0 +1,138 @@ +// Copyright 2022 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Observability Config is used by gRPC Observability plugin to control provided +// observability features. It contains parameters to enable/disable certain +// features, or fine tune the verbosity. +// +// Note that gRPC may use this config in JSON form, not in protobuf form. This +// proto definition is intended to help document the schema but might not +// actually be used directly by gRPC. + +syntax = "proto3"; + +package grpc.observability.config.v1alpha; + +import "google/protobuf/duration.proto"; + +option java_package = "io.grpc.observability.config"; +option java_multiple_files = true; +option java_outer_classname = "ObservabilityConfigProto"; +option go_package = "google.golang.org/grpc/observability/internal/config"; + +message Sampler { + // RateLimitingSampler enforces the average data collection intervals + // between calls. + message RateLimitingSampler { + // The default sample interval is 10s. + google.protobuf.Duration sample_interval = 1; + } + + // ProbabilisticSampler picks calls via straightforward probability. + message ProbabilisticSampler { + // The default tracing rate is 0.1. + uint32 rate_numerator = 1; + uint32 rate_denominator = 2; + } + + // AlwaysSampler picks every call. + message AlwaysSampler {} + + // NeverSampler disables sampling. + message NeverSampler {} + + oneof sampler { + RateLimitingSampler rate_limiting = 1; + ProbabilisticSampler probabilistic = 2; + AlwaysSampler always = 3; + NeverSampler never = 4; + } +} + +// Configuration for observability behaviors. By default, no configuration is +// required for tracing/metrics/logging to function. This config captures the +// most common knobs for gRPC users. It's always possible to override with +// explicit config in code. +message ObservabilityConfig { + + message ExporterConfig { + // Following options turn off the default exporters, this allows + // applications to use custom exporters without duplicated uploads. + bool disable_default_tracing_exporter = 1; + bool disable_default_metrics_exporter = 2; + bool disable_default_logging_exporter = 3; + + // The project identifier. + string project_id = 4; + + // The reporting interval for all observability data for default exporters. + google.protobuf.Duration reporting_interval = 5; + } + + message TracingConfig { + // Defines the sampling algorithm and behavior. The default sampler is + // RateLimitingSampler with 10s interval. + Sampler sampler = 1; + } + + message MetricsConfig { + } + + message LoggingConfig { + message LogFilter { + // A string which can select a group of method names. Only "*" wildcard + // is accepted. + // Examples: + // - "Foo/Bar" selects only the method "Bar" from service "Foo" + // - "Foo/*" selects all methods from service "Foo" + // - "*/*" selects all methods from all services. + string pattern = 1; + // Number of bytes of each header to log. If the size of the header is + // greater than the defined limit, content pass the limit will be + // truncated. The default value is 0. + int32 header_bytes = 2; + // Number of bytes of each message to log. If the size of the message is + // greater than the defined limit, content pass the limit will be + // truncated. The default value is 0. + int32 message_bytes = 3; + // Attachs a sampler to this group of methods. The default sampler is + // AlwaysSampler. + Sampler sampler = 4; + } + + // A list of method config. The order matters here - the first pattern which + // matches the current method will apply the associated config options in + // the LogFilter. Any other LogFilter that also matches that comes later + // will be ignored. So a LogFilter of "*/*" should appear last in this list. + repeated LogFilter log_filters = 1; + } + + message DeploymentConfig { + } + + // Controls the exporter behavior + ExporterConfig exporter_config = 1; + + // Controls the tracing behavior + TracingConfig tracing_config = 2; + + // Controls the metrics behavior + MetricsConfig metrics_config = 3; + + // Controls the logging behavior + LoggingConfig logging_config = 4; + + // Controls the enhanced behavior for specific deployment environment + DeploymentConfig deployment_config = 5; +} diff --git a/observability/internal/logging/logging.pb.go b/observability/internal/logging/logging.pb.go new file mode 100644 index 000000000000..78f90a900b00 --- /dev/null +++ b/observability/internal/logging/logging.pb.go @@ -0,0 +1,914 @@ +// Copyright 2022 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.14.0 +// source: observability/internal/logging/logging.proto + +package logging + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// List of event types +type GrpcLogRecord_EventType int32 + +const ( + // Unknown event type + GrpcLogRecord_GRPC_CALL_UNKNOWN GrpcLogRecord_EventType = 0 + // Header sent from client to server + GrpcLogRecord_GRPC_CALL_REQUEST_HEADER GrpcLogRecord_EventType = 1 + // Header sent from server to client + GrpcLogRecord_GRPC_CALL_RESPONSE_HEADER GrpcLogRecord_EventType = 2 + // Message sent from client to server + GrpcLogRecord_GRPC_CALL_REQUEST_MESSAGE GrpcLogRecord_EventType = 3 + // Message sent from server to client + GrpcLogRecord_GRPC_CALL_RESPONSE_MESSAGE GrpcLogRecord_EventType = 4 + // Trailer indicates the end of the gRPC call + GrpcLogRecord_GRPC_CALL_TRAILER GrpcLogRecord_EventType = 5 + // A signal that client is done sending + GrpcLogRecord_GRPC_CALL_HALF_CLOSE GrpcLogRecord_EventType = 6 + // A signal that the rpc is canceled + GrpcLogRecord_GRPC_CALL_CANCEL GrpcLogRecord_EventType = 7 +) + +// Enum value maps for GrpcLogRecord_EventType. +var ( + GrpcLogRecord_EventType_name = map[int32]string{ + 0: "GRPC_CALL_UNKNOWN", + 1: "GRPC_CALL_REQUEST_HEADER", + 2: "GRPC_CALL_RESPONSE_HEADER", + 3: "GRPC_CALL_REQUEST_MESSAGE", + 4: "GRPC_CALL_RESPONSE_MESSAGE", + 5: "GRPC_CALL_TRAILER", + 6: "GRPC_CALL_HALF_CLOSE", + 7: "GRPC_CALL_CANCEL", + } + GrpcLogRecord_EventType_value = map[string]int32{ + "GRPC_CALL_UNKNOWN": 0, + "GRPC_CALL_REQUEST_HEADER": 1, + "GRPC_CALL_RESPONSE_HEADER": 2, + "GRPC_CALL_REQUEST_MESSAGE": 3, + "GRPC_CALL_RESPONSE_MESSAGE": 4, + "GRPC_CALL_TRAILER": 5, + "GRPC_CALL_HALF_CLOSE": 6, + "GRPC_CALL_CANCEL": 7, + } +) + +func (x GrpcLogRecord_EventType) Enum() *GrpcLogRecord_EventType { + p := new(GrpcLogRecord_EventType) + *p = x + return p +} + +func (x GrpcLogRecord_EventType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GrpcLogRecord_EventType) Descriptor() protoreflect.EnumDescriptor { + return file_observability_internal_logging_logging_proto_enumTypes[0].Descriptor() +} + +func (GrpcLogRecord_EventType) Type() protoreflect.EnumType { + return &file_observability_internal_logging_logging_proto_enumTypes[0] +} + +func (x GrpcLogRecord_EventType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GrpcLogRecord_EventType.Descriptor instead. +func (GrpcLogRecord_EventType) EnumDescriptor() ([]byte, []int) { + return file_observability_internal_logging_logging_proto_rawDescGZIP(), []int{0, 0} +} + +// The entity that generates the log entry +type GrpcLogRecord_EventLogger int32 + +const ( + GrpcLogRecord_LOGGER_UNKNOWN GrpcLogRecord_EventLogger = 0 + GrpcLogRecord_LOGGER_CLIENT GrpcLogRecord_EventLogger = 1 + GrpcLogRecord_LOGGER_SERVER GrpcLogRecord_EventLogger = 2 +) + +// Enum value maps for GrpcLogRecord_EventLogger. +var ( + GrpcLogRecord_EventLogger_name = map[int32]string{ + 0: "LOGGER_UNKNOWN", + 1: "LOGGER_CLIENT", + 2: "LOGGER_SERVER", + } + GrpcLogRecord_EventLogger_value = map[string]int32{ + "LOGGER_UNKNOWN": 0, + "LOGGER_CLIENT": 1, + "LOGGER_SERVER": 2, + } +) + +func (x GrpcLogRecord_EventLogger) Enum() *GrpcLogRecord_EventLogger { + p := new(GrpcLogRecord_EventLogger) + *p = x + return p +} + +func (x GrpcLogRecord_EventLogger) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GrpcLogRecord_EventLogger) Descriptor() protoreflect.EnumDescriptor { + return file_observability_internal_logging_logging_proto_enumTypes[1].Descriptor() +} + +func (GrpcLogRecord_EventLogger) Type() protoreflect.EnumType { + return &file_observability_internal_logging_logging_proto_enumTypes[1] +} + +func (x GrpcLogRecord_EventLogger) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GrpcLogRecord_EventLogger.Descriptor instead. +func (GrpcLogRecord_EventLogger) EnumDescriptor() ([]byte, []int) { + return file_observability_internal_logging_logging_proto_rawDescGZIP(), []int{0, 1} +} + +// The log severity level of the log entry +type GrpcLogRecord_LogLevel int32 + +const ( + GrpcLogRecord_LOG_LEVEL_UNKNOWN GrpcLogRecord_LogLevel = 0 + GrpcLogRecord_LOG_LEVEL_TRACE GrpcLogRecord_LogLevel = 1 + GrpcLogRecord_LOG_LEVEL_DEBUG GrpcLogRecord_LogLevel = 2 + GrpcLogRecord_LOG_LEVEL_INFO GrpcLogRecord_LogLevel = 3 + GrpcLogRecord_LOG_LEVEL_WARN GrpcLogRecord_LogLevel = 4 + GrpcLogRecord_LOG_LEVEL_ERROR GrpcLogRecord_LogLevel = 5 + GrpcLogRecord_LOG_LEVEL_CRITICAL GrpcLogRecord_LogLevel = 6 +) + +// Enum value maps for GrpcLogRecord_LogLevel. +var ( + GrpcLogRecord_LogLevel_name = map[int32]string{ + 0: "LOG_LEVEL_UNKNOWN", + 1: "LOG_LEVEL_TRACE", + 2: "LOG_LEVEL_DEBUG", + 3: "LOG_LEVEL_INFO", + 4: "LOG_LEVEL_WARN", + 5: "LOG_LEVEL_ERROR", + 6: "LOG_LEVEL_CRITICAL", + } + GrpcLogRecord_LogLevel_value = map[string]int32{ + "LOG_LEVEL_UNKNOWN": 0, + "LOG_LEVEL_TRACE": 1, + "LOG_LEVEL_DEBUG": 2, + "LOG_LEVEL_INFO": 3, + "LOG_LEVEL_WARN": 4, + "LOG_LEVEL_ERROR": 5, + "LOG_LEVEL_CRITICAL": 6, + } +) + +func (x GrpcLogRecord_LogLevel) Enum() *GrpcLogRecord_LogLevel { + p := new(GrpcLogRecord_LogLevel) + *p = x + return p +} + +func (x GrpcLogRecord_LogLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GrpcLogRecord_LogLevel) Descriptor() protoreflect.EnumDescriptor { + return file_observability_internal_logging_logging_proto_enumTypes[2].Descriptor() +} + +func (GrpcLogRecord_LogLevel) Type() protoreflect.EnumType { + return &file_observability_internal_logging_logging_proto_enumTypes[2] +} + +func (x GrpcLogRecord_LogLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GrpcLogRecord_LogLevel.Descriptor instead. +func (GrpcLogRecord_LogLevel) EnumDescriptor() ([]byte, []int) { + return file_observability_internal_logging_logging_proto_rawDescGZIP(), []int{0, 2} +} + +type GrpcLogRecord_Address_Type int32 + +const ( + GrpcLogRecord_Address_TYPE_UNKNOWN GrpcLogRecord_Address_Type = 0 + GrpcLogRecord_Address_TYPE_IPV4 GrpcLogRecord_Address_Type = 1 // in 1.2.3.4 form + GrpcLogRecord_Address_TYPE_IPV6 GrpcLogRecord_Address_Type = 2 // IPv6 canonical form (RFC5952 section 4) + GrpcLogRecord_Address_TYPE_UNIX GrpcLogRecord_Address_Type = 3 // UDS string +) + +// Enum value maps for GrpcLogRecord_Address_Type. +var ( + GrpcLogRecord_Address_Type_name = map[int32]string{ + 0: "TYPE_UNKNOWN", + 1: "TYPE_IPV4", + 2: "TYPE_IPV6", + 3: "TYPE_UNIX", + } + GrpcLogRecord_Address_Type_value = map[string]int32{ + "TYPE_UNKNOWN": 0, + "TYPE_IPV4": 1, + "TYPE_IPV6": 2, + "TYPE_UNIX": 3, + } +) + +func (x GrpcLogRecord_Address_Type) Enum() *GrpcLogRecord_Address_Type { + p := new(GrpcLogRecord_Address_Type) + *p = x + return p +} + +func (x GrpcLogRecord_Address_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GrpcLogRecord_Address_Type) Descriptor() protoreflect.EnumDescriptor { + return file_observability_internal_logging_logging_proto_enumTypes[3].Descriptor() +} + +func (GrpcLogRecord_Address_Type) Type() protoreflect.EnumType { + return &file_observability_internal_logging_logging_proto_enumTypes[3] +} + +func (x GrpcLogRecord_Address_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GrpcLogRecord_Address_Type.Descriptor instead. +func (GrpcLogRecord_Address_Type) EnumDescriptor() ([]byte, []int) { + return file_observability_internal_logging_logging_proto_rawDescGZIP(), []int{0, 2, 0} +} + +type GrpcLogRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The timestamp of the log event + Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Uniquely identifies a call. The value must not be 0 in order to disambiguate + // from an unset value. + // Each call may have several log entries. They will all have the same rpc_id. + // Nothing is guaranteed about their value other than they are unique across + // different RPCs in the same gRPC process. + RpcId uint64 `protobuf:"varint,2,opt,name=rpc_id,json=rpcId,proto3" json:"rpc_id,omitempty"` + EventType GrpcLogRecord_EventType `protobuf:"varint,3,opt,name=event_type,json=eventType,proto3,enum=grpc.observability.logging.v1.GrpcLogRecord_EventType" json:"event_type,omitempty"` // one of the above EventType enum + EventLogger GrpcLogRecord_EventLogger `protobuf:"varint,4,opt,name=event_logger,json=eventLogger,proto3,enum=grpc.observability.logging.v1.GrpcLogRecord_EventLogger" json:"event_logger,omitempty"` // one of the above EventLogger enum + // the name of the service + ServiceName string `protobuf:"bytes,5,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + // the name of the RPC method + MethodName string `protobuf:"bytes,6,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` + LogLevel GrpcLogRecord_LogLevel `protobuf:"varint,7,opt,name=log_level,json=logLevel,proto3,enum=grpc.observability.logging.v1.GrpcLogRecord_LogLevel" json:"log_level,omitempty"` // one of the above LogLevel enum + // Peer address information. On client side, peer is logged on server + // header event or trailer event (if trailer-only). On server side, peer + // is always logged on the client header event. + PeerAddress *GrpcLogRecord_Address `protobuf:"bytes,8,opt,name=peer_address,json=peerAddress,proto3" json:"peer_address,omitempty"` + // the RPC timeout value + Timeout *durationpb.Duration `protobuf:"bytes,11,opt,name=timeout,proto3" json:"timeout,omitempty"` + // A single process may be used to run multiple virtual servers with + // different identities. + // The authority is the name of such a server identify. It is typically a + // portion of the URI in the form of or :. + Authority string `protobuf:"bytes,12,opt,name=authority,proto3" json:"authority,omitempty"` + // Size of the message or metadata, depending on the event type, + // regardless of whether the full message or metadata is being logged + // (i.e. could be truncated or omitted). + PayloadSize uint32 `protobuf:"varint,13,opt,name=payload_size,json=payloadSize,proto3" json:"payload_size,omitempty"` + // true if message or metadata field is either truncated or omitted due + // to config options + PayloadTruncated bool `protobuf:"varint,14,opt,name=payload_truncated,json=payloadTruncated,proto3" json:"payload_truncated,omitempty"` + // Used by header event or trailer event + Metadata *GrpcLogRecord_Metadata `protobuf:"bytes,15,opt,name=metadata,proto3" json:"metadata,omitempty"` + // The entry sequence ID for this call. The first message has a value of 1, + // to disambiguate from an unset value. The purpose of this field is to + // detect missing entries in environments where durability or ordering is + // not guaranteed. + SequenceId uint64 `protobuf:"varint,16,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"` + // Used by message event + Message []byte `protobuf:"bytes,17,opt,name=message,proto3" json:"message,omitempty"` + // The gRPC status code + StatusCode uint32 `protobuf:"varint,18,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` + // The gRPC status message + StatusMessage string `protobuf:"bytes,19,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` + // The value of the grpc-status-details-bin metadata key, if any. + // This is always an encoded google.rpc.Status message + StatusDetails []byte `protobuf:"bytes,20,opt,name=status_details,json=statusDetails,proto3" json:"status_details,omitempty"` +} + +func (x *GrpcLogRecord) Reset() { + *x = GrpcLogRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_logging_logging_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrpcLogRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrpcLogRecord) ProtoMessage() {} + +func (x *GrpcLogRecord) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_logging_logging_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrpcLogRecord.ProtoReflect.Descriptor instead. +func (*GrpcLogRecord) Descriptor() ([]byte, []int) { + return file_observability_internal_logging_logging_proto_rawDescGZIP(), []int{0} +} + +func (x *GrpcLogRecord) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *GrpcLogRecord) GetRpcId() uint64 { + if x != nil { + return x.RpcId + } + return 0 +} + +func (x *GrpcLogRecord) GetEventType() GrpcLogRecord_EventType { + if x != nil { + return x.EventType + } + return GrpcLogRecord_GRPC_CALL_UNKNOWN +} + +func (x *GrpcLogRecord) GetEventLogger() GrpcLogRecord_EventLogger { + if x != nil { + return x.EventLogger + } + return GrpcLogRecord_LOGGER_UNKNOWN +} + +func (x *GrpcLogRecord) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + +func (x *GrpcLogRecord) GetMethodName() string { + if x != nil { + return x.MethodName + } + return "" +} + +func (x *GrpcLogRecord) GetLogLevel() GrpcLogRecord_LogLevel { + if x != nil { + return x.LogLevel + } + return GrpcLogRecord_LOG_LEVEL_UNKNOWN +} + +func (x *GrpcLogRecord) GetPeerAddress() *GrpcLogRecord_Address { + if x != nil { + return x.PeerAddress + } + return nil +} + +func (x *GrpcLogRecord) GetTimeout() *durationpb.Duration { + if x != nil { + return x.Timeout + } + return nil +} + +func (x *GrpcLogRecord) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *GrpcLogRecord) GetPayloadSize() uint32 { + if x != nil { + return x.PayloadSize + } + return 0 +} + +func (x *GrpcLogRecord) GetPayloadTruncated() bool { + if x != nil { + return x.PayloadTruncated + } + return false +} + +func (x *GrpcLogRecord) GetMetadata() *GrpcLogRecord_Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *GrpcLogRecord) GetSequenceId() uint64 { + if x != nil { + return x.SequenceId + } + return 0 +} + +func (x *GrpcLogRecord) GetMessage() []byte { + if x != nil { + return x.Message + } + return nil +} + +func (x *GrpcLogRecord) GetStatusCode() uint32 { + if x != nil { + return x.StatusCode + } + return 0 +} + +func (x *GrpcLogRecord) GetStatusMessage() string { + if x != nil { + return x.StatusMessage + } + return "" +} + +func (x *GrpcLogRecord) GetStatusDetails() []byte { + if x != nil { + return x.StatusDetails + } + return nil +} + +// A list of metadata pairs +type GrpcLogRecord_Metadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entry []*GrpcLogRecord_MetadataEntry `protobuf:"bytes,1,rep,name=entry,proto3" json:"entry,omitempty"` +} + +func (x *GrpcLogRecord_Metadata) Reset() { + *x = GrpcLogRecord_Metadata{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_logging_logging_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrpcLogRecord_Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrpcLogRecord_Metadata) ProtoMessage() {} + +func (x *GrpcLogRecord_Metadata) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_logging_logging_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrpcLogRecord_Metadata.ProtoReflect.Descriptor instead. +func (*GrpcLogRecord_Metadata) Descriptor() ([]byte, []int) { + return file_observability_internal_logging_logging_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *GrpcLogRecord_Metadata) GetEntry() []*GrpcLogRecord_MetadataEntry { + if x != nil { + return x.Entry + } + return nil +} + +// One metadata key value pair +type GrpcLogRecord_MetadataEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *GrpcLogRecord_MetadataEntry) Reset() { + *x = GrpcLogRecord_MetadataEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_logging_logging_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrpcLogRecord_MetadataEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrpcLogRecord_MetadataEntry) ProtoMessage() {} + +func (x *GrpcLogRecord_MetadataEntry) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_logging_logging_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrpcLogRecord_MetadataEntry.ProtoReflect.Descriptor instead. +func (*GrpcLogRecord_MetadataEntry) Descriptor() ([]byte, []int) { + return file_observability_internal_logging_logging_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *GrpcLogRecord_MetadataEntry) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *GrpcLogRecord_MetadataEntry) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +// Address information +type GrpcLogRecord_Address struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type GrpcLogRecord_Address_Type `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.observability.logging.v1.GrpcLogRecord_Address_Type" json:"type,omitempty"` + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // only for TYPE_IPV4 and TYPE_IPV6 + IpPort uint32 `protobuf:"varint,3,opt,name=ip_port,json=ipPort,proto3" json:"ip_port,omitempty"` +} + +func (x *GrpcLogRecord_Address) Reset() { + *x = GrpcLogRecord_Address{} + if protoimpl.UnsafeEnabled { + mi := &file_observability_internal_logging_logging_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GrpcLogRecord_Address) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GrpcLogRecord_Address) ProtoMessage() {} + +func (x *GrpcLogRecord_Address) ProtoReflect() protoreflect.Message { + mi := &file_observability_internal_logging_logging_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GrpcLogRecord_Address.ProtoReflect.Descriptor instead. +func (*GrpcLogRecord_Address) Descriptor() ([]byte, []int) { + return file_observability_internal_logging_logging_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *GrpcLogRecord_Address) GetType() GrpcLogRecord_Address_Type { + if x != nil { + return x.Type + } + return GrpcLogRecord_Address_TYPE_UNKNOWN +} + +func (x *GrpcLogRecord_Address) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *GrpcLogRecord_Address) GetIpPort() uint32 { + if x != nil { + return x.IpPort + } + return 0 +} + +var File_observability_internal_logging_logging_proto protoreflect.FileDescriptor + +var file_observability_internal_logging_logging_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, + 0x2f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, + 0x0d, 0x0a, 0x0d, 0x47, 0x72, 0x70, 0x63, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x70, + 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x72, 0x70, 0x63, 0x49, + 0x64, 0x12, 0x55, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5b, 0x0a, 0x0c, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x72, 0x70, 0x63, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x52, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x4c, + 0x6f, 0x67, 0x67, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x09, 0x6c, 0x6f, 0x67, + 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x70, + 0x63, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x57, 0x0a, + 0x0c, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2b, 0x0a, 0x11, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x51, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x70, 0x63, + 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0a, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x5c, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x50, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x1a, 0x37, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xd2, 0x01, + 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x39, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x6f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x6c, 0x6f, 0x67, + 0x67, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x70, 0x63, 0x4c, 0x6f, 0x67, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x06, 0x69, 0x70, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x45, 0x0a, 0x04, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x50, + 0x56, 0x34, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x50, 0x56, + 0x36, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x58, + 0x10, 0x03, 0x22, 0xe5, 0x01, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x15, 0x0a, 0x11, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x43, 0x41, 0x4c, 0x4c, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x47, 0x52, 0x50, 0x43, 0x5f, + 0x43, 0x41, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x48, 0x45, 0x41, + 0x44, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x43, 0x41, + 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x48, 0x45, 0x41, 0x44, + 0x45, 0x52, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x43, 0x41, 0x4c, + 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, + 0x45, 0x10, 0x03, 0x12, 0x1e, 0x0a, 0x1a, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x43, 0x41, 0x4c, 0x4c, + 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, + 0x45, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x43, 0x41, 0x4c, 0x4c, + 0x5f, 0x54, 0x52, 0x41, 0x49, 0x4c, 0x45, 0x52, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x47, 0x52, + 0x50, 0x43, 0x5f, 0x43, 0x41, 0x4c, 0x4c, 0x5f, 0x48, 0x41, 0x4c, 0x46, 0x5f, 0x43, 0x4c, 0x4f, + 0x53, 0x45, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x43, 0x41, 0x4c, + 0x4c, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x07, 0x22, 0x47, 0x0a, 0x0b, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, + 0x47, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x11, 0x0a, + 0x0d, 0x4c, 0x4f, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x01, + 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x47, 0x47, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, + 0x52, 0x10, 0x02, 0x22, 0xa0, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, + 0x12, 0x15, 0x0a, 0x11, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, + 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x45, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, + 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, + 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, + 0x4e, 0x46, 0x4f, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, + 0x45, 0x4c, 0x5f, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x47, + 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x16, + 0x0a, 0x12, 0x4c, 0x4f, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x43, 0x52, 0x49, 0x54, + 0x49, 0x43, 0x41, 0x4c, 0x10, 0x06, 0x42, 0x73, 0x0a, 0x1d, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, + 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x42, 0x19, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, + 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x6f, 0x62, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_observability_internal_logging_logging_proto_rawDescOnce sync.Once + file_observability_internal_logging_logging_proto_rawDescData = file_observability_internal_logging_logging_proto_rawDesc +) + +func file_observability_internal_logging_logging_proto_rawDescGZIP() []byte { + file_observability_internal_logging_logging_proto_rawDescOnce.Do(func() { + file_observability_internal_logging_logging_proto_rawDescData = protoimpl.X.CompressGZIP(file_observability_internal_logging_logging_proto_rawDescData) + }) + return file_observability_internal_logging_logging_proto_rawDescData +} + +var file_observability_internal_logging_logging_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_observability_internal_logging_logging_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_observability_internal_logging_logging_proto_goTypes = []interface{}{ + (GrpcLogRecord_EventType)(0), // 0: grpc.observability.logging.v1.GrpcLogRecord.EventType + (GrpcLogRecord_EventLogger)(0), // 1: grpc.observability.logging.v1.GrpcLogRecord.EventLogger + (GrpcLogRecord_LogLevel)(0), // 2: grpc.observability.logging.v1.GrpcLogRecord.LogLevel + (GrpcLogRecord_Address_Type)(0), // 3: grpc.observability.logging.v1.GrpcLogRecord.Address.Type + (*GrpcLogRecord)(nil), // 4: grpc.observability.logging.v1.GrpcLogRecord + (*GrpcLogRecord_Metadata)(nil), // 5: grpc.observability.logging.v1.GrpcLogRecord.Metadata + (*GrpcLogRecord_MetadataEntry)(nil), // 6: grpc.observability.logging.v1.GrpcLogRecord.MetadataEntry + (*GrpcLogRecord_Address)(nil), // 7: grpc.observability.logging.v1.GrpcLogRecord.Address + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 9: google.protobuf.Duration +} +var file_observability_internal_logging_logging_proto_depIdxs = []int32{ + 8, // 0: grpc.observability.logging.v1.GrpcLogRecord.timestamp:type_name -> google.protobuf.Timestamp + 0, // 1: grpc.observability.logging.v1.GrpcLogRecord.event_type:type_name -> grpc.observability.logging.v1.GrpcLogRecord.EventType + 1, // 2: grpc.observability.logging.v1.GrpcLogRecord.event_logger:type_name -> grpc.observability.logging.v1.GrpcLogRecord.EventLogger + 2, // 3: grpc.observability.logging.v1.GrpcLogRecord.log_level:type_name -> grpc.observability.logging.v1.GrpcLogRecord.LogLevel + 7, // 4: grpc.observability.logging.v1.GrpcLogRecord.peer_address:type_name -> grpc.observability.logging.v1.GrpcLogRecord.Address + 9, // 5: grpc.observability.logging.v1.GrpcLogRecord.timeout:type_name -> google.protobuf.Duration + 5, // 6: grpc.observability.logging.v1.GrpcLogRecord.metadata:type_name -> grpc.observability.logging.v1.GrpcLogRecord.Metadata + 6, // 7: grpc.observability.logging.v1.GrpcLogRecord.Metadata.entry:type_name -> grpc.observability.logging.v1.GrpcLogRecord.MetadataEntry + 3, // 8: grpc.observability.logging.v1.GrpcLogRecord.Address.type:type_name -> grpc.observability.logging.v1.GrpcLogRecord.Address.Type + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_observability_internal_logging_logging_proto_init() } +func file_observability_internal_logging_logging_proto_init() { + if File_observability_internal_logging_logging_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_observability_internal_logging_logging_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrpcLogRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_logging_logging_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrpcLogRecord_Metadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_logging_logging_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrpcLogRecord_MetadataEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_observability_internal_logging_logging_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GrpcLogRecord_Address); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_observability_internal_logging_logging_proto_rawDesc, + NumEnums: 4, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_observability_internal_logging_logging_proto_goTypes, + DependencyIndexes: file_observability_internal_logging_logging_proto_depIdxs, + EnumInfos: file_observability_internal_logging_logging_proto_enumTypes, + MessageInfos: file_observability_internal_logging_logging_proto_msgTypes, + }.Build() + File_observability_internal_logging_logging_proto = out.File + file_observability_internal_logging_logging_proto_rawDesc = nil + file_observability_internal_logging_logging_proto_goTypes = nil + file_observability_internal_logging_logging_proto_depIdxs = nil +} diff --git a/observability/internal/logging/logging.proto b/observability/internal/logging/logging.proto new file mode 100644 index 000000000000..07c00910c18c --- /dev/null +++ b/observability/internal/logging/logging.proto @@ -0,0 +1,153 @@ +// Copyright 2022 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package grpc.observability.logging.v1; + +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option java_package = "io.grpc.observability.logging"; +option java_multiple_files = true; +option java_outer_classname = "ObservabilityLoggingProto"; +option go_package = "google.golang.org/grpc/observability/internal/logging"; + +message GrpcLogRecord { + // List of event types + enum EventType { + // Unknown event type + GRPC_CALL_UNKNOWN = 0; + // Header sent from client to server + GRPC_CALL_REQUEST_HEADER = 1; + // Header sent from server to client + GRPC_CALL_RESPONSE_HEADER = 2; + // Message sent from client to server + GRPC_CALL_REQUEST_MESSAGE = 3; + // Message sent from server to client + GRPC_CALL_RESPONSE_MESSAGE = 4; + // Trailer indicates the end of the gRPC call + GRPC_CALL_TRAILER = 5; + // A signal that client is done sending + GRPC_CALL_HALF_CLOSE = 6; + // A signal that the rpc is canceled + GRPC_CALL_CANCEL = 7; + } + // The entity that generates the log entry + enum EventLogger { + LOGGER_UNKNOWN = 0; + LOGGER_CLIENT = 1; + LOGGER_SERVER = 2; + } + // The log severity level of the log entry + enum LogLevel { + LOG_LEVEL_UNKNOWN = 0; + LOG_LEVEL_TRACE = 1; + LOG_LEVEL_DEBUG = 2; + LOG_LEVEL_INFO = 3; + LOG_LEVEL_WARN = 4; + LOG_LEVEL_ERROR = 5; + LOG_LEVEL_CRITICAL = 6; + } + + // The timestamp of the log event + google.protobuf.Timestamp timestamp = 1; + + // Uniquely identifies a call. The value must not be 0 in order to disambiguate + // from an unset value. + // Each call may have several log entries. They will all have the same rpc_id. + // Nothing is guaranteed about their value other than they are unique across + // different RPCs in the same gRPC process. + uint64 rpc_id = 2; + + EventType event_type = 3; // one of the above EventType enum + EventLogger event_logger = 4; // one of the above EventLogger enum + + // the name of the service + string service_name = 5; + // the name of the RPC method + string method_name = 6; + + LogLevel log_level = 7; // one of the above LogLevel enum + + // Peer address information. On client side, peer is logged on server + // header event or trailer event (if trailer-only). On server side, peer + // is always logged on the client header event. + Address peer_address = 8; + + // the RPC timeout value + google.protobuf.Duration timeout = 11; + + // A single process may be used to run multiple virtual servers with + // different identities. + // The authority is the name of such a server identify. It is typically a + // portion of the URI in the form of or :. + string authority = 12; + + // Size of the message or metadata, depending on the event type, + // regardless of whether the full message or metadata is being logged + // (i.e. could be truncated or omitted). + uint32 payload_size = 13; + + // true if message or metadata field is either truncated or omitted due + // to config options + bool payload_truncated = 14; + + // Used by header event or trailer event + Metadata metadata = 15; + + // The entry sequence ID for this call. The first message has a value of 1, + // to disambiguate from an unset value. The purpose of this field is to + // detect missing entries in environments where durability or ordering is + // not guaranteed. + uint64 sequence_id = 16; + + // Used by message event + bytes message = 17; + + // The gRPC status code + uint32 status_code = 18; + + // The gRPC status message + string status_message = 19; + + // The value of the grpc-status-details-bin metadata key, if any. + // This is always an encoded google.rpc.Status message + bytes status_details = 20; + + // A list of metadata pairs + message Metadata { + repeated MetadataEntry entry = 1; + } + + // One metadata key value pair + message MetadataEntry { + string key = 1; + bytes value = 2; + } + + // Address information + message Address { + enum Type { + TYPE_UNKNOWN = 0; + TYPE_IPV4 = 1; // in 1.2.3.4 form + TYPE_IPV6 = 2; // IPv6 canonical form (RFC5952 section 4) + TYPE_UNIX = 3; // UDS string + } + Type type = 1; + string address = 2; + // only for TYPE_IPV4 and TYPE_IPV6 + uint32 ip_port = 3; + } +} diff --git a/observability/logging.go b/observability/logging.go new file mode 100644 index 000000000000..f9fa571e4414 --- /dev/null +++ b/observability/logging.go @@ -0,0 +1,154 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package observability + +import ( + "fmt" + "strings" + + "google.golang.org/grpc/binarylog" + binlogpb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" + iblog "google.golang.org/grpc/internal/binarylog" + configpb "google.golang.org/grpc/observability/internal/config" + grpclogrecordpb "google.golang.org/grpc/observability/internal/logging" +) + +// translateMetadata translates the metadata from Binary Logging format to +// its GrpcLogRecord equivalent +func translateMetadata(m *binlogpb.Metadata) *grpclogrecordpb.GrpcLogRecord_Metadata { + var res grpclogrecordpb.GrpcLogRecord_Metadata + res.Entry = make([]*grpclogrecordpb.GrpcLogRecord_MetadataEntry, len(m.Entry)) + for i, e := range m.Entry { + res.Entry[i] = &grpclogrecordpb.GrpcLogRecord_MetadataEntry{ + Key: e.Key, + Value: e.Value, + } + } + return &res +} + +type cloudLoggingSink struct{} + +// Write translate a Binary Logging log entry to a GrpcLogEntry used by the gRPC +// Observability project. +func (cls *cloudLoggingSink) Write(binlogEntry *binlogpb.GrpcLogEntry) error { + var grpcLogRecord grpclogrecordpb.GrpcLogRecord + grpcLogRecord.Timestamp = binlogEntry.Timestamp + grpcLogRecord.RpcId = binlogEntry.CallId + grpcLogRecord.SequenceId = binlogEntry.SequenceIdWithinCall + grpcLogRecord.LogLevel = grpclogrecordpb.GrpcLogRecord_LOG_LEVEL_DEBUG + switch binlogEntry.Type { + case binlogpb.GrpcLogEntry_EVENT_TYPE_UNKNOWN: + grpcLogRecord.EventType = grpclogrecordpb.GrpcLogRecord_GRPC_CALL_UNKNOWN + case binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER: + grpcLogRecord.EventType = grpclogrecordpb.GrpcLogRecord_GRPC_CALL_REQUEST_HEADER + // Example method name: /grpc.testing.TestService/UnaryCall + service_method := strings.Split(binlogEntry.GetClientHeader().MethodName, "/") + grpcLogRecord.ServiceName = service_method[1] + grpcLogRecord.MethodName = service_method[2] + if binlogEntry.Peer != nil { + grpcLogRecord.PeerAddress = &grpclogrecordpb.GrpcLogRecord_Address{ + Type: grpclogrecordpb.GrpcLogRecord_Address_Type(binlogEntry.Peer.Type), + Address: binlogEntry.Peer.Address, + IpPort: binlogEntry.Peer.IpPort, + } + } + grpcLogRecord.Timeout = binlogEntry.GetClientHeader().Timeout + grpcLogRecord.Authority = binlogEntry.GetClientHeader().Authority + grpcLogRecord.Metadata = translateMetadata(binlogEntry.GetClientHeader().Metadata) + grpcLogRecord.PayloadTruncated = binlogEntry.PayloadTruncated + case binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_HEADER: + grpcLogRecord.EventType = grpclogrecordpb.GrpcLogRecord_GRPC_CALL_RESPONSE_HEADER + if binlogEntry.Peer != nil { + grpcLogRecord.PeerAddress = &grpclogrecordpb.GrpcLogRecord_Address{ + Type: grpclogrecordpb.GrpcLogRecord_Address_Type(binlogEntry.Peer.Type), + Address: binlogEntry.Peer.Address, + IpPort: binlogEntry.Peer.IpPort, + } + } + grpcLogRecord.Metadata = translateMetadata(binlogEntry.GetServerHeader().Metadata) + grpcLogRecord.PayloadTruncated = binlogEntry.PayloadTruncated + case binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE: + grpcLogRecord.EventType = grpclogrecordpb.GrpcLogRecord_GRPC_CALL_REQUEST_MESSAGE + grpcLogRecord.Message = binlogEntry.GetMessage().Data + grpcLogRecord.PayloadSize = binlogEntry.GetMessage().GetLength() + grpcLogRecord.PayloadTruncated = binlogEntry.PayloadTruncated + case binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE: + grpcLogRecord.EventType = grpclogrecordpb.GrpcLogRecord_GRPC_CALL_RESPONSE_MESSAGE + grpcLogRecord.Message = binlogEntry.GetMessage().Data + grpcLogRecord.PayloadSize = binlogEntry.GetMessage().GetLength() + grpcLogRecord.PayloadTruncated = binlogEntry.PayloadTruncated + case binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE: + grpcLogRecord.EventType = grpclogrecordpb.GrpcLogRecord_GRPC_CALL_HALF_CLOSE + case binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_TRAILER: + grpcLogRecord.EventType = grpclogrecordpb.GrpcLogRecord_GRPC_CALL_TRAILER + grpcLogRecord.Metadata = translateMetadata(binlogEntry.GetTrailer().Metadata) + grpcLogRecord.StatusCode = binlogEntry.GetTrailer().StatusCode + grpcLogRecord.StatusMessage = binlogEntry.GetTrailer().StatusMessage + grpcLogRecord.StatusDetails = binlogEntry.GetTrailer().StatusDetails + grpcLogRecord.PayloadTruncated = binlogEntry.PayloadTruncated + case binlogpb.GrpcLogEntry_EVENT_TYPE_CANCEL: + grpcLogRecord.EventType = grpclogrecordpb.GrpcLogRecord_GRPC_CALL_CANCEL + default: + return fmt.Errorf("unknown event type: %v", binlogEntry.Type) + } + switch binlogEntry.Logger { + case binlogpb.GrpcLogEntry_LOGGER_UNKNOWN: + grpcLogRecord.EventLogger = grpclogrecordpb.GrpcLogRecord_LOGGER_UNKNOWN + case binlogpb.GrpcLogEntry_LOGGER_CLIENT: + grpcLogRecord.EventLogger = grpclogrecordpb.GrpcLogRecord_LOGGER_CLIENT + case binlogpb.GrpcLogEntry_LOGGER_SERVER: + grpcLogRecord.EventLogger = grpclogrecordpb.GrpcLogRecord_LOGGER_SERVER + default: + return fmt.Errorf("unknown event logger: %v", binlogEntry.Logger) + } + // CloudLogging client doesn't return error on entry write. Entry writes don't mean the data will be uploaded immediately. + Emit(&grpcLogRecord) + return nil +} + +// Close closes the cloudLoggingSink, which is a noop due to no state is +// maintained by this object +func (cls *cloudLoggingSink) Close() error { + return nil +} + +var ( + logSink *cloudLoggingSink +) + +func compileBinaryLogControlString(config *configpb.ObservabilityConfig) string { + if config.LoggingConfig == nil { + return "" + } + + var entries []string + for _, logFilter := range config.LoggingConfig.LogFilters { + entries = append(entries, fmt.Sprintf("%v{h:%v;m:%v}", logFilter.Pattern, logFilter.HeaderBytes, logFilter.MessageBytes)) + } + return strings.Join(entries, ",") +} + +func startLogging(config *configpb.ObservabilityConfig) { + var binlogConfig = compileBinaryLogControlString(config) + iblog.SetLogger(iblog.NewLoggerFromConfigString(binlogConfig)) + logSink = &cloudLoggingSink{} + binarylog.SetSink(logSink) + logger.Infof("Start logging with config [%v] and sink [%p]", binlogConfig, logSink) +} diff --git a/observability/observability.go b/observability/observability.go new file mode 100644 index 000000000000..d15f1aac39f7 --- /dev/null +++ b/observability/observability.go @@ -0,0 +1,53 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package observability + +import ( + "context" + + "google.golang.org/grpc/grpclog" +) + +type observabilityConextKey string + +var ( + logger = grpclog.Component("observability") +) + +// Start is the opt-in API for gRPC Observability plugin. +// - it loads observability config from environment; +// - it registers default exporters if not disabled by the config; +// - it injects StatsHandler to all clients and servers. +func Start(ctx context.Context) { + config := parseObservabilityConfig(ctx) + + // If the default logging exporter is enabled, register one + if config.ExporterConfig.ProjectId != "" && !config.ExporterConfig.DisableDefaultLoggingExporter { + createDefaultLoggingExporter(ctx, config.ExporterConfig.ProjectId) + } + + startLogging(config) +} + +// End is the clean-up API for gRPC Observability plugin. In the main function +// of the application, we expect users to call "defer observability.End()". This +// function flushes data to upstream, and cleanup resources. +func End() { + closeLoggingExporter() +} diff --git a/observability/observability_test.go b/observability/observability_test.go new file mode 100644 index 000000000000..0ca5c9cca4c3 --- /dev/null +++ b/observability/observability_test.go @@ -0,0 +1,468 @@ +/* + * + * Copyright 2022 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package observability + +import ( + "bytes" + "context" + "fmt" + "net" + "os" + "sync" + "testing" + "time" + + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/internal/grpctest" + "google.golang.org/grpc/internal/leakcheck" + testgrpc "google.golang.org/grpc/interop/grpc_testing" + testpb "google.golang.org/grpc/interop/grpc_testing" + "google.golang.org/grpc/metadata" + configpb "google.golang.org/grpc/observability/internal/config" + grpclogrecordpb "google.golang.org/grpc/observability/internal/logging" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +type s struct { + grpctest.Tester +} + +func Test(t *testing.T) { + grpctest.RunSubTests(t, s{}) +} + +func init() { + // OpenCensus, once included in binary, will spawn a global goroutine + // recorder that is not controllable by application. + // https://github.com/census-instrumentation/opencensus-go/issues/1191 + leakcheck.RegisterIgnoreGoroutine("go.opencensus.io/stats/view.(*worker).start") + // google-cloud-go leaks HTTP client. They are aware of this: + // https://github.com/googleapis/google-cloud-go/issues/1183 + leakcheck.RegisterIgnoreGoroutine("internal/poll.runtime_pollWait") +} + +var ( + defaultTestTimeout = 10 * time.Second + testHeaderMetadata = metadata.MD{"header": []string{"HeADer"}} + testTrailerMetadata = metadata.MD{"trailer": []string{"TrAileR"}} + testOkPayload = []byte{72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100} + testErrorPayload = []byte{77, 97, 114, 116, 104, 97} + testErrorMessage = "test case injected error" + infinitySizeBytes int32 = 1024 * 1024 * 1024 +) + +type testServer struct { + testgrpc.UnimplementedTestServiceServer +} + +func (s *testServer) UnaryCall(ctx context.Context, in *testpb.SimpleRequest) (*testpb.SimpleResponse, error) { + if err := grpc.SendHeader(ctx, testHeaderMetadata); err != nil { + return nil, status.Errorf(status.Code(err), "grpc.SendHeader(_, %v) = %v, want ", testHeaderMetadata, err) + } + if err := grpc.SetTrailer(ctx, testTrailerMetadata); err != nil { + return nil, status.Errorf(status.Code(err), "grpc.SetTrailer(_, %v) = %v, want ", testTrailerMetadata, err) + } + + if bytes.Equal(in.Payload.Body, testErrorPayload) { + return nil, fmt.Errorf(testErrorMessage) + } + + return &testpb.SimpleResponse{Payload: in.Payload}, nil +} + +type fakeLoggingExporter struct { + t *testing.T + clientEvents []*grpclogrecordpb.GrpcLogRecord + serverEvents []*grpclogrecordpb.GrpcLogRecord + isClosed bool + mu sync.Mutex +} + +func (fle *fakeLoggingExporter) EmitGrpcLogRecord(l *grpclogrecordpb.GrpcLogRecord) { + fle.mu.Lock() + defer fle.mu.Unlock() + switch l.EventLogger { + case grpclogrecordpb.GrpcLogRecord_LOGGER_CLIENT: + fle.clientEvents = append(fle.clientEvents, l) + case grpclogrecordpb.GrpcLogRecord_LOGGER_SERVER: + fle.serverEvents = append(fle.serverEvents, l) + default: + fle.t.Fatalf("unexpected event logger: %v", l.EventLogger) + } + eventJSON, _ := protojson.Marshal(l) + fle.t.Logf("fakeLoggingExporter Emit: %s", eventJSON) +} + +func (fle *fakeLoggingExporter) Close() error { + fle.isClosed = true + return nil +} + +// test is an end-to-end test. It should be created with the newTest +// func, modified as needed, and then started with its startServer method. +// It should be cleaned up with the tearDown method. +type test struct { + t *testing.T + fle *fakeLoggingExporter + + testServer testgrpc.TestServiceServer // nil means none + // srv and srvAddr are set once startServer is called. + srv *grpc.Server + srvAddr string + + cc *grpc.ClientConn // nil until requested via clientConn +} + +func (te *test) tearDown() { + if te.cc != nil { + te.cc.Close() + te.cc = nil + } + te.srv.Stop() + End() + + if !te.fle.isClosed { + te.t.Fatalf("fakeLoggingExporter not closed!") + } +} + +// newTest returns a new test using the provided testing.T and +// environment. It is returned with default values. Tests should +// modify it before calling its startServer and clientConn methods. +func newTest(t *testing.T) *test { + return &test{ + t: t, + fle: &fakeLoggingExporter{t: t}, + } +} + +// startServer starts a gRPC server listening. Callers should defer a +// call to te.tearDown to clean up. +func (te *test) startServer(ts testgrpc.TestServiceServer) { + te.testServer = ts + lis, err := net.Listen("tcp", "localhost:0") + if err != nil { + te.t.Fatalf("Failed to listen: %v", err) + } + var opts []grpc.ServerOption + s := grpc.NewServer(opts...) + te.srv = s + if te.testServer != nil { + testgrpc.RegisterTestServiceServer(s, te.testServer) + } + + go s.Serve(lis) + te.srvAddr = lis.Addr().String() +} + +func (te *test) clientConn() *grpc.ClientConn { + if te.cc != nil { + return te.cc + } + opts := []grpc.DialOption{ + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithBlock(), + grpc.WithUserAgent("test/0.0.1"), + } + var err error + te.cc, err = grpc.Dial(te.srvAddr, opts...) + if err != nil { + te.t.Fatalf("Dial(%q) = %v", te.srvAddr, err) + } + return te.cc +} + +func (te *test) enablePluginWithFakeExporters() { + // Disables default exporters + config := &configpb.ObservabilityConfig{ + ExporterConfig: &configpb.ObservabilityConfig_ExporterConfig{ + DisableDefaultTracingExporter: true, + DisableDefaultMetricsExporter: true, + DisableDefaultLoggingExporter: true, + }, + LoggingConfig: &configpb.ObservabilityConfig_LoggingConfig{ + LogFilters: []*configpb.ObservabilityConfig_LoggingConfig_LogFilter{ + { + Pattern: "*", + HeaderBytes: infinitySizeBytes, + MessageBytes: infinitySizeBytes, + }, + }, + }, + } + configJSON, err := protojson.Marshal(config) + if err != nil { + te.t.Fatalf("failed to convert config to JSON: %v", err) + } + os.Setenv(envKeyObservabilityConfig, string(configJSON)) + Start(context.Background()) + // Injects the fake exporter for testing purposes + registerLoggingExporter(te.fle) +} + +func checkEventCommon(t *testing.T, seen *grpclogrecordpb.GrpcLogRecord) { + if seen.RpcId == 0 { + t.Fatalf("expect non-zero RpcId") + } + if seen.SequenceId == 0 { + t.Fatalf("expect non-zero SequenceId") + } +} + +func checkEventRequestHeader(t *testing.T, seen *grpclogrecordpb.GrpcLogRecord, want *grpclogrecordpb.GrpcLogRecord) { + checkEventCommon(t, seen) + if seen.EventType != grpclogrecordpb.GrpcLogRecord_GRPC_CALL_REQUEST_HEADER { + t.Fatalf("got %v, want GrpcLogRecord_GRPC_CALL_REQUEST_HEADER", seen.EventType.String()) + } + if seen.EventLogger != want.EventLogger { + t.Fatalf("l.EventLogger = %v, want %v", seen.EventLogger, want.EventLogger) + } + if want.Authority != "" && seen.Authority != want.Authority { + t.Fatalf("l.Authority = %v, want %v", seen.Authority, want.Authority) + } + if want.ServiceName != "" && seen.ServiceName != want.ServiceName { + t.Fatalf("l.ServiceName = %v, want %v", seen.ServiceName, want.ServiceName) + } + if want.MethodName != "" && seen.MethodName != want.MethodName { + t.Fatalf("l.MethodName = %v, want %v", seen.MethodName, want.MethodName) + } + if len(seen.Metadata.Entry) != 1 { + t.Fatalf("unexpected header size: %v != 1", len(seen.Metadata.Entry)) + } + if seen.Metadata.Entry[0].Key != "header" { + t.Fatalf("unexpected header: %v", seen.Metadata.Entry[0].Key) + } + if !bytes.Equal(seen.Metadata.Entry[0].Value, []byte(testHeaderMetadata["header"][0])) { + t.Fatalf("unexpected header value: %v", seen.Metadata.Entry[0].Value) + } +} + +func checkEventResponseHeader(t *testing.T, seen *grpclogrecordpb.GrpcLogRecord, want *grpclogrecordpb.GrpcLogRecord) { + checkEventCommon(t, seen) + if seen.EventType != grpclogrecordpb.GrpcLogRecord_GRPC_CALL_RESPONSE_HEADER { + t.Fatalf("got %v, want GrpcLogRecord_GRPC_CALL_RESPONSE_HEADER", seen.EventType.String()) + } + if seen.EventLogger != want.EventLogger { + t.Fatalf("l.EventLogger = %v, want %v", seen.EventLogger, want.EventLogger) + } + if len(seen.Metadata.Entry) != 1 { + t.Fatalf("unexpected header size: %v != 1", len(seen.Metadata.Entry)) + } + if seen.Metadata.Entry[0].Key != "header" { + t.Fatalf("unexpected header: %v", seen.Metadata.Entry[0].Key) + } + if !bytes.Equal(seen.Metadata.Entry[0].Value, []byte(testHeaderMetadata["header"][0])) { + t.Fatalf("unexpected header value: %v", seen.Metadata.Entry[0].Value) + } +} + +func checkEventRequestMessage(t *testing.T, seen *grpclogrecordpb.GrpcLogRecord, want *grpclogrecordpb.GrpcLogRecord, payload []byte) { + checkEventCommon(t, seen) + if seen.EventType != grpclogrecordpb.GrpcLogRecord_GRPC_CALL_REQUEST_MESSAGE { + t.Fatalf("got %v, want GrpcLogRecord_GRPC_CALL_REQUEST_MESSAGE", seen.EventType.String()) + } + if seen.EventLogger != want.EventLogger { + t.Fatalf("l.EventLogger = %v, want %v", seen.EventLogger, want.EventLogger) + } + msg := &testpb.SimpleRequest{Payload: &testpb.Payload{Body: payload}} + msgBytes, _ := proto.Marshal(msg) + if !bytes.Equal(seen.Message, msgBytes) { + t.Fatalf("unexpected payload: %v != %v", seen.Message, payload) + } +} + +func checkEventResponseMessage(t *testing.T, seen *grpclogrecordpb.GrpcLogRecord, want *grpclogrecordpb.GrpcLogRecord, payload []byte) { + checkEventCommon(t, seen) + if seen.EventType != grpclogrecordpb.GrpcLogRecord_GRPC_CALL_RESPONSE_MESSAGE { + t.Fatalf("got %v, want GrpcLogRecord_GRPC_CALL_RESPONSE_MESSAGE", seen.EventType.String()) + } + if seen.EventLogger != want.EventLogger { + t.Fatalf("l.EventLogger = %v, want %v", seen.EventLogger, want.EventLogger) + } + msg := &testpb.SimpleResponse{Payload: &testpb.Payload{Body: payload}} + msgBytes, _ := proto.Marshal(msg) + if !bytes.Equal(seen.Message, msgBytes) { + t.Fatalf("unexpected payload: %v != %v", seen.Message, payload) + } +} + +func checkEventTrailer(t *testing.T, seen *grpclogrecordpb.GrpcLogRecord, want *grpclogrecordpb.GrpcLogRecord) { + checkEventCommon(t, seen) + if seen.EventType != grpclogrecordpb.GrpcLogRecord_GRPC_CALL_TRAILER { + t.Fatalf("got %v, want GrpcLogRecord_GRPC_CALL_TRAILER", seen.EventType.String()) + } + if seen.EventLogger != want.EventLogger { + t.Fatalf("l.EventLogger = %v, want %v", seen.EventLogger, want.EventLogger) + } + if seen.StatusCode != want.StatusCode { + t.Fatalf("l.StatusCode = %v, want %v", seen.StatusCode, want.StatusCode) + } + if seen.StatusMessage != want.StatusMessage { + t.Fatalf("l.StatusMessage = %v, want %v", seen.StatusMessage, want.StatusMessage) + } + if !bytes.Equal(seen.StatusDetails, want.StatusDetails) { + t.Fatalf("l.StatusDetails = %v, want %v", seen.StatusDetails, want.StatusDetails) + } + if len(seen.Metadata.Entry) != 1 { + t.Fatalf("unexpected trailer size: %v != 1", len(seen.Metadata.Entry)) + } + if seen.Metadata.Entry[0].Key != "trailer" { + t.Fatalf("unexpected trailer: %v", seen.Metadata.Entry[0].Key) + } + if !bytes.Equal(seen.Metadata.Entry[0].Value, []byte(testTrailerMetadata["trailer"][0])) { + t.Fatalf("unexpected trailer value: %v", seen.Metadata.Entry[0].Value) + } +} + +func (s) TestLoggingForOkCall(t *testing.T) { + te := newTest(t) + defer te.tearDown() + te.enablePluginWithFakeExporters() + te.startServer(&testServer{}) + tc := testgrpc.NewTestServiceClient(te.clientConn()) + + var ( + resp *testpb.SimpleResponse + req *testpb.SimpleRequest + err error + ) + req = &testpb.SimpleRequest{Payload: &testpb.Payload{Body: testOkPayload}} + tCtx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) + defer cancel() + resp, err = tc.UnaryCall(metadata.NewOutgoingContext(tCtx, testHeaderMetadata), req) + if err != nil { + t.Fatalf("unary call failed: %v", err) + } + t.Logf("unary call passed: %v", resp) + + // Wait for the gRPC transport to gracefully close to ensure no lost event. + te.cc.Close() + te.srv.GracefulStop() + // Check size of events + if len(te.fle.clientEvents) != 5 { + t.Fatalf("expects 5 client events, got %d", len(te.fle.clientEvents)) + } + if len(te.fle.serverEvents) != 5 { + t.Fatalf("expects 5 server events, got %d", len(te.fle.serverEvents)) + } + // Client events + checkEventRequestHeader(te.t, te.fle.clientEvents[0], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_CLIENT, + Authority: te.srvAddr, + ServiceName: "grpc.testing.TestService", + MethodName: "UnaryCall", + }) + checkEventRequestMessage(te.t, te.fle.clientEvents[1], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_CLIENT, + }, testOkPayload) + checkEventResponseHeader(te.t, te.fle.clientEvents[2], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_CLIENT, + }) + checkEventResponseMessage(te.t, te.fle.clientEvents[3], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_CLIENT, + }, testOkPayload) + checkEventTrailer(te.t, te.fle.clientEvents[4], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_CLIENT, + StatusCode: 0, + }) + // Server events + checkEventRequestHeader(te.t, te.fle.serverEvents[0], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_SERVER, + }) + checkEventRequestMessage(te.t, te.fle.serverEvents[1], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_SERVER, + }, testOkPayload) + checkEventResponseHeader(te.t, te.fle.serverEvents[2], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_SERVER, + }) + checkEventResponseMessage(te.t, te.fle.serverEvents[3], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_SERVER, + }, testOkPayload) + checkEventTrailer(te.t, te.fle.serverEvents[4], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_SERVER, + StatusCode: 0, + }) +} + +func (s) TestLoggingForErrorCall(t *testing.T) { + te := newTest(t) + defer te.tearDown() + te.enablePluginWithFakeExporters() + te.startServer(&testServer{}) + tc := testgrpc.NewTestServiceClient(te.clientConn()) + + var ( + req *testpb.SimpleRequest + err error + ) + req = &testpb.SimpleRequest{Payload: &testpb.Payload{Body: testErrorPayload}} + tCtx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) + defer cancel() + _, err = tc.UnaryCall(metadata.NewOutgoingContext(tCtx, testHeaderMetadata), req) + if err == nil { + t.Fatalf("unary call expected to fail, but passed") + } + + // Wait for the gRPC transport to gracefully close to ensure no lost event. + te.cc.Close() + te.srv.GracefulStop() + // Check size of events + if len(te.fle.clientEvents) != 4 { + t.Fatalf("expects 4 client events, got %d", len(te.fle.clientEvents)) + } + if len(te.fle.serverEvents) != 4 { + t.Fatalf("expects 4 server events, got %d", len(te.fle.serverEvents)) + } + // Client events + checkEventRequestHeader(te.t, te.fle.clientEvents[0], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_CLIENT, + Authority: te.srvAddr, + ServiceName: "grpc.testing.TestService", + MethodName: "UnaryCall", + }) + checkEventRequestMessage(te.t, te.fle.clientEvents[1], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_CLIENT, + }, testErrorPayload) + checkEventResponseHeader(te.t, te.fle.clientEvents[2], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_CLIENT, + }) + checkEventTrailer(te.t, te.fle.clientEvents[3], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_CLIENT, + StatusCode: 2, + StatusMessage: testErrorMessage, + }) + // Server events + checkEventRequestHeader(te.t, te.fle.serverEvents[0], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_SERVER, + }) + checkEventRequestMessage(te.t, te.fle.serverEvents[1], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_SERVER, + }, testErrorPayload) + checkEventResponseHeader(te.t, te.fle.serverEvents[2], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_SERVER, + }) + checkEventTrailer(te.t, te.fle.serverEvents[3], &grpclogrecordpb.GrpcLogRecord{ + EventLogger: grpclogrecordpb.GrpcLogRecord_LOGGER_SERVER, + StatusCode: 2, + StatusMessage: testErrorMessage, + }) +}