Skip to content

Commit 6f807d5

Browse files
authored
feat: configure access logs with Telemetry API (#1021)
1 parent 0605aca commit 6f807d5

11 files changed

Lines changed: 326 additions & 34 deletions

File tree

dubbod/discovery/pkg/bootstrap/inherent_grpc_controller.go

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,17 @@ type inherentGRPCRuntimeConfig struct {
372372
}
373373

374374
type inherentGRPCTelemetryRuntimeConfig struct {
375-
Metrics *inherentGRPCMetricsRuntimeConfig `json:"metrics,omitempty"`
375+
Metrics *inherentGRPCMetricsRuntimeConfig `json:"metrics,omitempty"`
376+
Logging []inherentGRPCLoggingRuntimeConfig `json:"logging,omitempty"`
377+
}
378+
379+
type inherentGRPCLoggingRuntimeConfig struct {
380+
Providers []string `json:"providers,omitempty"`
381+
Disabled bool `json:"disabled"`
382+
Mode string `json:"mode,omitempty"`
383+
FilterExpression string `json:"filterExpression,omitempty"`
384+
Tags map[string]string `json:"tags,omitempty"`
385+
Endpoint string `json:"endpoint,omitempty"`
376386
}
377387

378388
type inherentGRPCMetricsRuntimeConfig struct {
@@ -771,28 +781,52 @@ func buildRuntimeConfigJSON(
771781
}
772782

773783
func inherentGRPCTelemetryConfig(effective telemetryconfig.EffectiveTracing) *inherentGRPCTelemetryRuntimeConfig {
774-
if !effective.MetricsConfigured {
784+
if !effective.MetricsConfigured && !effective.LoggingConfigured {
775785
return nil
776786
}
777-
metrics := &inherentGRPCMetricsRuntimeConfig{
778-
Enabled: effective.MetricsEnabled(),
779-
Providers: append([]string(nil), effective.MetricProviders...),
780-
Rules: make([]inherentGRPCMetricRuleRuntimeConfig, 0, len(effective.MetricRules)),
787+
config := &inherentGRPCTelemetryRuntimeConfig{
788+
Logging: make([]inherentGRPCLoggingRuntimeConfig, 0, len(effective.Logging)),
781789
}
782-
for _, rule := range effective.MetricRules {
783-
runtimeRule := inherentGRPCMetricRuleRuntimeConfig{
784-
Metric: rule.Metric.String(),
785-
Scope: rule.Scope.String(),
790+
if effective.MetricsConfigured {
791+
config.Metrics = &inherentGRPCMetricsRuntimeConfig{
792+
Enabled: effective.MetricsEnabled(),
793+
Providers: append([]string(nil), effective.MetricProviders...),
794+
Rules: make([]inherentGRPCMetricRuleRuntimeConfig, 0, len(effective.MetricRules)),
786795
}
787-
if len(rule.Tags) > 0 {
788-
runtimeRule.Tags = make(map[string]inherentGRPCTagOverrideRuntimeConfig, len(rule.Tags))
789-
for _, tag := range rule.Tags {
790-
runtimeRule.Tags[tag.Name] = inherentGRPCTagOverrideRuntimeConfig{Action: tag.Action.String()}
796+
for _, rule := range effective.MetricRules {
797+
runtimeRule := inherentGRPCMetricRuleRuntimeConfig{
798+
Metric: rule.Metric.String(),
799+
Scope: rule.Scope.String(),
791800
}
801+
if len(rule.Tags) > 0 {
802+
runtimeRule.Tags = make(map[string]inherentGRPCTagOverrideRuntimeConfig, len(rule.Tags))
803+
for _, tag := range rule.Tags {
804+
runtimeRule.Tags[tag.Name] = inherentGRPCTagOverrideRuntimeConfig{Action: tag.Action.String()}
805+
}
806+
}
807+
config.Metrics.Rules = append(config.Metrics.Rules, runtimeRule)
808+
}
809+
}
810+
for _, rule := range effective.Logging {
811+
runtimeRule := inherentGRPCLoggingRuntimeConfig{
812+
Providers: append([]string(nil), rule.Providers...),
813+
Disabled: rule.Disabled,
814+
Mode: rule.Mode.String(),
815+
FilterExpression: rule.FilterExpression,
816+
Tags: make(map[string]string, len(rule.Tags)),
817+
}
818+
if runtimeRule.Mode == "MODE_UNSPECIFIED" {
819+
runtimeRule.Mode = "CLIENT_AND_SERVER"
820+
}
821+
if len(rule.Providers) > 0 {
822+
runtimeRule.Endpoint = telemetryconfig.ProviderEndpoint(rule.Providers[0], constants.DubboSystemNamespace)
823+
}
824+
for _, tag := range rule.Tags {
825+
runtimeRule.Tags[tag.Name] = tag.Value
792826
}
793-
metrics.Rules = append(metrics.Rules, runtimeRule)
827+
config.Logging = append(config.Logging, runtimeRule)
794828
}
795-
return &inherentGRPCTelemetryRuntimeConfig{Metrics: metrics}
829+
return config
796830
}
797831

798832
func (c *inherentGRPCWorkloadController) buildRuntimeTrafficConfig() ([]inherentGRPCServiceRuntimeConfig, []inherentGRPCRouteRuntimeConfig) {

dubbod/discovery/pkg/bootstrap/inherent_grpc_controller_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ func TestBuildRuntimeConfigJSON(t *testing.T) {
162162
Action: telemetryapi.TagOverride_REMOVE,
163163
}},
164164
}},
165+
LoggingConfigured: true,
166+
Logging: []telemetryconfig.LoggingRule{{
167+
Providers: []string{telemetryconfig.OTELLogProvider},
168+
Mode: telemetryapi.Logging_Match_SERVER,
169+
FilterExpression: "response.code >= 500",
170+
Tags: []telemetryconfig.Tag{{Name: "environment", Value: "test"}},
171+
}},
165172
}
166173
data, err := buildRuntimeConfigJSON(workload, nil, nil, effectiveTelemetry)
167174
if err != nil {
@@ -249,6 +256,16 @@ func TestBuildRuntimeConfigJSON(t *testing.T) {
249256
if tag := rule.Tags["grpc_response_status"]; tag.Action != "REMOVE" {
250257
t.Fatalf("grpc_response_status override = %#v", tag)
251258
}
259+
if len(got.Telemetry.Logging) != 1 {
260+
t.Fatalf("telemetry logging = %#v, want one", got.Telemetry.Logging)
261+
}
262+
logging := got.Telemetry.Logging[0]
263+
if logging.Mode != "SERVER" ||
264+
logging.Endpoint != "http://opentelemetry-collector.dubbo-system.svc:4317" ||
265+
logging.FilterExpression != "response.code >= 500" ||
266+
logging.Tags["environment"] != "test" {
267+
t.Fatalf("telemetry logging = %#v", logging)
268+
}
252269
}
253270

254271
func TestInherentTelemetrySerializesAllStandardMetrics(t *testing.T) {

dubbod/discovery/pkg/config/kube/gateway/deployment_controller.go

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,15 @@ func (d *DeploymentController) configureGateway(log *dubbolog.Logger, gw gateway
424424
ClusterID: string(d.clusterID),
425425
DomainSuffix: d.domainSuffix(),
426426
OtelEndpoint: observability.OtelEndpoint,
427+
OtelLogsEndpoint: observability.OtelLogsEndpoint,
427428
OtelServiceName: observability.OtelServiceName,
428429
OtelSampling: observability.OtelSampling,
429430
OtelTags: observability.OtelTags,
430431
AccessLog: observability.AccessLog,
431432
AccessLogFormat: observability.AccessLogFormat,
433+
AccessLogMode: observability.AccessLogMode,
434+
AccessLogFilter: observability.AccessLogFilter,
435+
AccessLogTags: observability.AccessLogTags,
432436

433437
ActivationControlPlane: d.activationControlPlane(),
434438
ActivationHoldTimeout: features.ActivationHoldTimeout,
@@ -506,11 +510,15 @@ type TemplateInput struct {
506510
ClusterID string
507511
DomainSuffix string
508512
OtelEndpoint string
513+
OtelLogsEndpoint string
509514
OtelServiceName string
510515
OtelSampling string
511516
OtelTags string
512517
AccessLog string
513518
AccessLogFormat string
519+
AccessLogMode string
520+
AccessLogFilter string
521+
AccessLogTags string
514522
// ActivationControlPlane is the address a gateway reports pending requests
515523
// to so that scaled-to-zero targets get activated. Empty turns the feature
516524
// off in the data plane; the gateway then fails such a request outright, as
@@ -520,12 +528,16 @@ type TemplateInput struct {
520528
}
521529

522530
type gatewayObservabilityConfig struct {
523-
OtelEndpoint string
524-
OtelServiceName string
525-
OtelSampling string
526-
OtelTags string
527-
AccessLog string
528-
AccessLogFormat string
531+
OtelEndpoint string
532+
OtelLogsEndpoint string
533+
OtelServiceName string
534+
OtelSampling string
535+
OtelTags string
536+
AccessLog string
537+
AccessLogFormat string
538+
AccessLogMode string
539+
AccessLogFilter string
540+
AccessLogTags string
529541
}
530542

531543
// observabilityConfigForGateway resolves the meshlevel, namespace, and
@@ -554,6 +566,30 @@ func resolveGatewayObservability(gw gateway.Gateway, meshNamespace string, resou
554566
if effective.Configured && !effective.Disabled() {
555567
cfg.OtelEndpoint = telemetryconfig.ProviderEndpoint(effective.Provider(), meshNamespace)
556568
}
569+
for _, logging := range effective.Logging {
570+
mode := logging.Mode.String()
571+
if mode == "MODE_UNSPECIFIED" {
572+
mode = "CLIENT_AND_SERVER"
573+
}
574+
if mode != "SERVER" && mode != "CLIENT_AND_SERVER" {
575+
continue
576+
}
577+
cfg.AccessLog = strconv.FormatBool(!logging.Disabled)
578+
cfg.AccessLogMode = mode
579+
cfg.AccessLogFilter = logging.FilterExpression
580+
tags := make(map[string]string, len(logging.Tags))
581+
for _, tag := range logging.Tags {
582+
tags[tag.Name] = tag.Value
583+
}
584+
if len(tags) > 0 {
585+
data, _ := json.Marshal(tags)
586+
cfg.AccessLogTags = string(data)
587+
}
588+
if len(logging.Providers) > 0 && !logging.Disabled {
589+
cfg.OtelLogsEndpoint = telemetryconfig.ProviderEndpoint(logging.Providers[0], meshNamespace)
590+
}
591+
break
592+
}
557593
return cfg
558594
}
559595

dubbod/discovery/pkg/config/kube/gateway/deployment_controller_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,11 @@ func TestResolveGatewayObservabilityTelemetryHierarchy(t *testing.T) {
856856
Providers: []*apitelemetry.Tracing_TracingProvider{{Name: "localtrace"}},
857857
Tags: []*apitelemetry.Tracing_Tag{{Name: "foo", Value: "bar"}},
858858
RandomSamplingPercentage: wrapperspb.Double(100),
859+
}}, Logging: []*apitelemetry.Logging{{
860+
Providers: []*apitelemetry.Logging_LoggingProvider{{Name: telemetryconfig.OTELLogProvider}},
861+
Match: &apitelemetry.Logging_Match{Mode: apitelemetry.Logging_Match_SERVER},
862+
Filter: &apitelemetry.Logging_Filter{Expression: "response.code >= 500"},
863+
Tags: []*apitelemetry.Logging_Tag{{Name: "environment", Value: "test"}},
859864
}}},
860865
},
861866
{
@@ -880,6 +885,12 @@ func TestResolveGatewayObservabilityTelemetryHierarchy(t *testing.T) {
880885
if cfg.OtelTags != `{"userId":"unknown"}` {
881886
t.Fatalf("otel tags = %q", cfg.OtelTags)
882887
}
888+
if cfg.OtelLogsEndpoint != "http://opentelemetry-collector.dubbo-system.svc:4317" ||
889+
cfg.AccessLog != "true" || cfg.AccessLogMode != "SERVER" ||
890+
cfg.AccessLogFilter != "response.code >= 500" ||
891+
cfg.AccessLogTags != `{"environment":"test"}` {
892+
t.Fatalf("access logging = %#v", cfg)
893+
}
883894
resources = append(resources, telemetryconfig.Resource{
884895
Name: "workload-override", Namespace: "app", CreationTimestamp: time.Unix(3, 0),
885896
Spec: &apitelemetry.Telemetry{

go.mod

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ require (
4141
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
4242
github.com/hashicorp/go-multierror v1.1.1
4343
github.com/hashicorp/golang-lru/v2 v2.0.7
44-
github.com/kdubbo/api v0.0.0-20260814141555-d9b670d33d9f
45-
github.com/kdubbo/client-go v0.0.0-20260814141742-c761bafa7cf3
46-
github.com/kdubbo/xds-api v0.0.0-20260814172110-c45be7c324a3
44+
github.com/kdubbo/api v0.0.0-20260820123851-c3a7c138547d
45+
github.com/kdubbo/client-go v0.0.0-20260820124012-0079f2cf2b1d
46+
github.com/kdubbo/xds-api v0.0.0-20260820125224-2e2719c54121
4747
github.com/prometheus/client_golang v1.23.2
4848
github.com/prometheus/client_model v0.6.2
4949
github.com/spf13/cobra v1.10.2
5050
github.com/spf13/pflag v1.0.10
5151
github.com/stoewer/go-strcase v1.3.1
5252
go.uber.org/atomic v1.11.0
5353
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
54-
golang.org/x/net v0.56.0
54+
golang.org/x/net v0.57.0
5555
golang.org/x/sys v0.47.0
5656
golang.org/x/term v0.45.0
5757
golang.org/x/time v0.15.0
@@ -106,6 +106,7 @@ require (
106106
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
107107
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
108108
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
109+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
109110
github.com/hashicorp/errwrap v1.1.0 // indirect
110111
github.com/huandu/xstrings v1.5.0 // indirect
111112
github.com/inconshreveable/mousetrap v1.1.0 // indirect
@@ -136,6 +137,7 @@ require (
136137
github.com/spf13/cast v1.8.0 // indirect
137138
github.com/x448/float16 v0.8.4 // indirect
138139
github.com/xlab/treeprint v1.2.0 // indirect
140+
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
139141
go.yaml.in/yaml/v2 v2.4.3 // indirect
140142
go.yaml.in/yaml/v3 v3.0.4 // indirect
141143
golang.org/x/crypto v0.54.0 // indirect

go.sum

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,7 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU
10071007
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
10081008
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
10091009
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1/go.mod h1:Zanoh4+gvIgluNqcfMVTJueD4wSS5hT7zTt4Mrutd90=
1010+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU=
10101011
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs=
10111012
github.com/hamba/avro/v2 v2.17.2/go.mod h1:Q9YK+qxAhtVrNqOhwlZTATLgLA8qxG2vtvkhK8fJ7Jo=
10121013
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
@@ -1071,12 +1072,12 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8
10711072
github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
10721073
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
10731074
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
1074-
github.com/kdubbo/api v0.0.0-20260814141555-d9b670d33d9f h1:T1jlRZ+ulFTUGziUnTjMvNEtiknaHQr4vQYviz4U/kQ=
1075-
github.com/kdubbo/api v0.0.0-20260814141555-d9b670d33d9f/go.mod h1:8BtJiIovg7QCPsCxXcw3gDf922VcvYq5ihOSvj49Rq8=
1076-
github.com/kdubbo/client-go v0.0.0-20260814141742-c761bafa7cf3 h1:vTpsq7IAuUqKz05NoCWpDu0MY5SdjpH5NXZpj+l4I9Q=
1077-
github.com/kdubbo/client-go v0.0.0-20260814141742-c761bafa7cf3/go.mod h1:wCARoHJuh9ccSRQYlGXzPyMfUMYavnRot05dKh1N4KY=
1078-
github.com/kdubbo/xds-api v0.0.0-20260814172110-c45be7c324a3 h1:ypir1ZNYdAKOuWokpObAdUtCDXLD3yqP1AOqCURe3WU=
1079-
github.com/kdubbo/xds-api v0.0.0-20260814172110-c45be7c324a3/go.mod h1:o2HDUgL1ntaDbWomZ4cD2tt8jBamuG2qRtjXOa1zZ0Q=
1075+
github.com/kdubbo/api v0.0.0-20260820123851-c3a7c138547d h1:FCV7OMp3FZmQzmJAM75SSI2SSVHsgbDxHz/pyCQGWVw=
1076+
github.com/kdubbo/api v0.0.0-20260820123851-c3a7c138547d/go.mod h1:8BtJiIovg7QCPsCxXcw3gDf922VcvYq5ihOSvj49Rq8=
1077+
github.com/kdubbo/client-go v0.0.0-20260820124012-0079f2cf2b1d h1:bfMl7kxZq9Gp83MNh/4btIjK4FiGzUNbHNJQNDcZL+w=
1078+
github.com/kdubbo/client-go v0.0.0-20260820124012-0079f2cf2b1d/go.mod h1:XiHz2FHeoNOavRxt2EQLR9WC6Jl69TzM5MwQrS4ToqU=
1079+
github.com/kdubbo/xds-api v0.0.0-20260820125224-2e2719c54121 h1:4yzXRhnMrCm6236P3dqU2f7CJpz7vzIQQkl5ye44HnQ=
1080+
github.com/kdubbo/xds-api v0.0.0-20260820125224-2e2719c54121/go.mod h1:TilAt91qTzM3pArPae5S/1uRTdH2adhGnFIUkTBaSkk=
10801081
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
10811082
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
10821083
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
@@ -1557,6 +1558,7 @@ go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI
15571558
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
15581559
go.opentelemetry.io/proto/otlp v1.7.0/go.mod h1:fSKjH6YJ7HDlwzltzyMj036AJ3ejJLCgCSHGj4efDDo=
15591560
go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE=
1561+
go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A=
15601562
go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4=
15611563
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
15621564
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
@@ -1858,8 +1860,8 @@ golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8=
18581860
golang.org/x/net v0.50.0/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM=
18591861
golang.org/x/net v0.51.0/go.mod h1:aamm+2QF5ogm02fjy5Bb7CQ0WMt1/WVM7FtyaTLlA9Y=
18601862
golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw=
1861-
golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o=
1862-
golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec=
1863+
golang.org/x/net v0.57.0 h1:K5+3DljvIuDG9/Jv9rvyMywYNFCQ9RSUY6OOTTkT+tE=
1864+
golang.org/x/net v0.57.0/go.mod h1:KpXc8iv+r3XplLAG/f7Jsf9RPszJzdR0f58q9vGOuEU=
18631865
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
18641866
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
18651867
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=

manifests/charts/base/files/crd-all.gen.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,60 @@ spec:
16011601
description: 'Telemetry configuration for Inherent workloads. See more
16021602
details at: '
16031603
properties:
1604+
logging:
1605+
description: Logging configures access logging for selected workloads.
1606+
items:
1607+
properties:
1608+
disabled:
1609+
description: Disables access logging for selected workloads.
1610+
nullable: true
1611+
type: boolean
1612+
filter:
1613+
description: Filters access logs using a CEL expression.
1614+
properties:
1615+
expression:
1616+
description: REQUIRED.
1617+
type: string
1618+
type: object
1619+
match:
1620+
description: Restricts access logs to a reporter side.
1621+
properties:
1622+
mode:
1623+
description: |-
1624+
Reporter side selected for access logging.
1625+
1626+
Valid Options: CLIENT, SERVER, CLIENT_AND_SERVER
1627+
enum:
1628+
- MODE_UNSPECIFIED
1629+
- CLIENT
1630+
- SERVER
1631+
- CLIENT_AND_SERVER
1632+
type: string
1633+
type: object
1634+
providers:
1635+
description: Providers used for access log reporting.
1636+
items:
1637+
properties:
1638+
name:
1639+
description: REQUIRED.
1640+
type: string
1641+
type: object
1642+
type: array
1643+
tags:
1644+
description: Static custom attributes added to generated access
1645+
logs.
1646+
items:
1647+
properties:
1648+
name:
1649+
description: REQUIRED.
1650+
type: string
1651+
value:
1652+
description: Static access log attribute value.
1653+
type: string
1654+
type: object
1655+
type: array
1656+
type: object
1657+
type: array
16041658
metrics:
16051659
description: Metrics configures metric generation for selected workloads.
16061660
items:

0 commit comments

Comments
 (0)