Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(MeshTrace): invalid sampling default values (backport of #11548) #11551

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6409,7 +6409,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Mirror of client_sampling in Envoy
Expand All @@ -6420,13 +6420,13 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Expand All @@ -6436,7 +6436,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6409,7 +6409,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Mirror of client_sampling in Envoy
Expand All @@ -6420,13 +6420,13 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Expand All @@ -6436,7 +6436,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6429,7 +6429,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Mirror of client_sampling in Envoy
Expand All @@ -6440,13 +6440,13 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Expand All @@ -6456,7 +6456,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced.
Expand Down
10 changes: 5 additions & 5 deletions app/kumactl/cmd/install/testdata/install-crds.all.golden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7956,7 +7956,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Mirror of client_sampling in Envoy
Expand All @@ -7967,13 +7967,13 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Expand All @@ -7983,7 +7983,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced.
Expand Down
10 changes: 5 additions & 5 deletions deployments/charts/kuma/crds/kuma.io_meshtraces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Mirror of client_sampling in Envoy
Expand All @@ -153,13 +153,13 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Expand All @@ -169,7 +169,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced.
Expand Down
14 changes: 7 additions & 7 deletions docs/generated/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10090,7 +10090,7 @@ components:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: >-
Target percentage of requests that will be force traced
if the
Expand All @@ -10106,7 +10106,7 @@ components:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: >-
Target percentage of requests will be traced

Expand All @@ -10116,11 +10116,11 @@ components:
random sampling). This field functions as an upper limit
on the total

configured sampling rate. For instance, setting
client_sampling to 100%
configured sampling rate. For instance, setting client
to 100

but overall_sampling to 1% will result in only 1% of
client requests with
but overall to 1 will result in only 1% of client
requests with

the appropriate headers to be force traced. Mirror of

Expand All @@ -10134,7 +10134,7 @@ components:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: >-
Target percentage of requests that will be randomly
selected for trace
Expand Down
10 changes: 5 additions & 5 deletions docs/generated/raw/crds/kuma.io_meshtraces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Mirror of client_sampling in Envoy
Expand All @@ -153,13 +153,13 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Expand All @@ -169,7 +169,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced.
Expand Down
10 changes: 5 additions & 5 deletions pkg/plugins/policies/meshtrace/api/v1alpha1/meshtrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,26 +103,26 @@ type Sampling struct {
// Target percentage of requests will be traced
// after all other sampling checks have been applied (client, force tracing,
// random sampling). This field functions as an upper limit on the total
// configured sampling rate. For instance, setting client_sampling to 100%
// but overall_sampling to 1% will result in only 1% of client requests with
// configured sampling rate. For instance, setting client to 100
// but overall to 1 will result in only 1% of client requests with
// the appropriate headers to be force traced. Mirror of
// overall_sampling in Envoy
// https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
// Either int or decimal represented as string.
// +kubebuilder:default="100%"
// +kubebuilder:default=100
Overall *intstr.IntOrString `json:"overall,omitempty"`
// Target percentage of requests that will be force traced if the
// 'x-client-trace-id' header is set. Mirror of client_sampling in Envoy
// https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L127-L133
// Either int or decimal represented as string.
// +kubebuilder:default="100%"
// +kubebuilder:default=100
Client *intstr.IntOrString `json:"client,omitempty"`
// Target percentage of requests that will be randomly selected for trace
// generation, if not requested by the client or not forced.
// Mirror of random_sampling in Envoy
// https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L135-L140
// Either int or decimal represented as string.
// +kubebuilder:default="100%"
// +kubebuilder:default=100
Random *intstr.IntOrString `json:"random,omitempty"`
}

Expand Down
10 changes: 5 additions & 5 deletions pkg/plugins/policies/meshtrace/api/v1alpha1/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ properties:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Mirror of client_sampling in Envoy
Expand All @@ -126,13 +126,13 @@ properties:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Expand All @@ -142,7 +142,7 @@ properties:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced.
Expand Down
10 changes: 5 additions & 5 deletions pkg/plugins/policies/meshtrace/k8s/crd/kuma.io_meshtraces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Mirror of client_sampling in Envoy
Expand All @@ -153,13 +153,13 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Expand All @@ -169,7 +169,7 @@ spec:
anyOf:
- type: integer
- type: string
default: 100%
default: 100
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced.
Expand Down
Loading