diff --git a/api/v1alpha1/envoyproxy_tracing_types.go b/api/v1alpha1/envoyproxy_tracing_types.go
index 2e25a7b2233..0143d880c94 100644
--- a/api/v1alpha1/envoyproxy_tracing_types.go
+++ b/api/v1alpha1/envoyproxy_tracing_types.go
@@ -94,11 +94,19 @@ const (
CustomTagTypeEnvironment CustomTagType = "Environment"
// CustomTagTypeRequestHeader adds value from request header to each span.
CustomTagTypeRequestHeader CustomTagType = "RequestHeader"
+ // CustomTagTypeFormatter adds value using formatter to each span.
+ CustomTagTypeFormatter CustomTagType = "Formatter"
)
+// CustomTag defines a custom tag to add to each span.
+//
+// +kubebuilder:validation:XValidation:message="formatter cannot be null when using Formatter type.",rule="self.type != 'Formatter' || has(self.formatter)"
+// +kubebuilder:validation:XValidation:message="requestHeader cannot be null when using RequestHeader type.",rule="self.type != 'RequestHeader' || has(self.requestHeader)"
+// +kubebuilder:validation:XValidation:message="environment cannot be null when using Environment type.",rule="self.type != 'Environment' || has(self.environment)"
+// +kubebuilder:validation:XValidation:message="literal cannot be null when using Literal type.",rule="self.type != 'Literal' || has(self.literal)"
type CustomTag struct {
// Type defines the type of custom tag.
- // +kubebuilder:validation:Enum=Literal;Environment;RequestHeader
+ // +kubebuilder:validation:Enum=Literal;Environment;RequestHeader;Formatter
// +unionDiscriminator
// +kubebuilder:default=Literal
Type CustomTagType `json:"type"`
@@ -111,6 +119,10 @@ type CustomTag struct {
// RequestHeader adds value from request header to each span.
// It's required when the type is "RequestHeader".
RequestHeader *RequestHeaderCustomTag `json:"requestHeader,omitempty"`
+ // Formatter adds value using formatter to each span.
+ // It's required when the type is "Formatter".
+ // +optional
+ Formatter *FormatterCustomTag `json:"formatter,omitempty"`
// TODO: add support for Metadata tags in the future.
// EG currently doesn't support metadata for route or cluster.
@@ -140,6 +152,15 @@ type RequestHeaderCustomTag struct {
DefaultValue *string `json:"defaultValue,omitempty"`
}
+type FormatterCustomTag struct {
+ // Values defines the formatter value to use,
+ // same [formatter](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) as HTTP access logging
+ // (e.g. %REQUESTED_SERVER_NAME%).
+ // Unknown specifier values are replaced
+ // with the empty string.
+ Value string `json:"value"`
+}
+
// ZipkinTracingProvider defines the Zipkin tracing provider configuration.
type ZipkinTracingProvider struct {
// Enable128BitTraceID determines whether a 128bit trace id will be used
diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go
index d5661561773..29bf1727e21 100644
--- a/api/v1alpha1/zz_generated.deepcopy.go
+++ b/api/v1alpha1/zz_generated.deepcopy.go
@@ -1694,6 +1694,11 @@ func (in *CustomTag) DeepCopyInto(out *CustomTag) {
*out = new(RequestHeaderCustomTag)
(*in).DeepCopyInto(*out)
}
+ if in.Formatter != nil {
+ in, out := &in.Formatter, &out.Formatter
+ *out = new(FormatterCustomTag)
+ **out = **in
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomTag.
@@ -3217,6 +3222,21 @@ func (in *ForceLocalZone) DeepCopy() *ForceLocalZone {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *FormatterCustomTag) DeepCopyInto(out *FormatterCustomTag) {
+ *out = *in
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FormatterCustomTag.
+func (in *FormatterCustomTag) DeepCopy() *FormatterCustomTag {
+ if in == nil {
+ return nil
+ }
+ out := new(FormatterCustomTag)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GRPCActiveHealthChecker) DeepCopyInto(out *GRPCActiveHealthChecker) {
*out = *in
diff --git a/charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml b/charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml
index 8ad379ea307..e214dac419e 100644
--- a/charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml
+++ b/charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml
@@ -2309,6 +2309,8 @@ spec:
properties:
customTags:
additionalProperties:
+ description: CustomTag defines a custom tag to add to each
+ span.
properties:
environment:
description: |-
@@ -2326,6 +2328,22 @@ spec:
required:
- name
type: object
+ formatter:
+ description: |-
+ Formatter adds value using formatter to each span.
+ It's required when the type is "Formatter".
+ properties:
+ value:
+ description: |-
+ Values defines the formatter value to use,
+ same [formatter](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) as HTTP access logging
+ (e.g. %REQUESTED_SERVER_NAME%).
+ Unknown specifier values are replaced
+ with the empty string.
+ type: string
+ required:
+ - value
+ type: object
literal:
description: |-
Literal adds hard-coded value to each span.
@@ -2361,10 +2379,23 @@ spec:
- Literal
- Environment
- RequestHeader
+ - Formatter
type: string
required:
- type
type: object
+ x-kubernetes-validations:
+ - message: formatter cannot be null when using Formatter
+ type.
+ rule: self.type != 'Formatter' || has(self.formatter)
+ - message: requestHeader cannot be null when using RequestHeader
+ type.
+ rule: self.type != 'RequestHeader' || has(self.requestHeader)
+ - message: environment cannot be null when using Environment
+ type.
+ rule: self.type != 'Environment' || has(self.environment)
+ - message: literal cannot be null when using Literal type.
+ rule: self.type != 'Literal' || has(self.literal)
description: |-
CustomTags defines the custom tags to add to each span.
If provider is kubernetes, pod name and namespace are added by default.
diff --git a/charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_envoyproxies.yaml b/charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_envoyproxies.yaml
index 0eec1f27094..6d46e6ecfb5 100644
--- a/charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_envoyproxies.yaml
+++ b/charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_envoyproxies.yaml
@@ -14817,6 +14817,8 @@ spec:
properties:
customTags:
additionalProperties:
+ description: CustomTag defines a custom tag to add to each
+ span.
properties:
environment:
description: |-
@@ -14834,6 +14836,22 @@ spec:
required:
- name
type: object
+ formatter:
+ description: |-
+ Formatter adds value using formatter to each span.
+ It's required when the type is "Formatter".
+ properties:
+ value:
+ description: |-
+ Values defines the formatter value to use,
+ same [formatter](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) as HTTP access logging
+ (e.g. %REQUESTED_SERVER_NAME%).
+ Unknown specifier values are replaced
+ with the empty string.
+ type: string
+ required:
+ - value
+ type: object
literal:
description: |-
Literal adds hard-coded value to each span.
@@ -14869,10 +14887,23 @@ spec:
- Literal
- Environment
- RequestHeader
+ - Formatter
type: string
required:
- type
type: object
+ x-kubernetes-validations:
+ - message: formatter cannot be null when using Formatter
+ type.
+ rule: self.type != 'Formatter' || has(self.formatter)
+ - message: requestHeader cannot be null when using RequestHeader
+ type.
+ rule: self.type != 'RequestHeader' || has(self.requestHeader)
+ - message: environment cannot be null when using Environment
+ type.
+ rule: self.type != 'Environment' || has(self.environment)
+ - message: literal cannot be null when using Literal type.
+ rule: self.type != 'Literal' || has(self.literal)
description: |-
CustomTags defines the custom tags to add to each span.
If provider is kubernetes, pod name and namespace are added by default.
diff --git a/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml
index 5944352f6f8..1d070ab481e 100644
--- a/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml
+++ b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml
@@ -2308,6 +2308,8 @@ spec:
properties:
customTags:
additionalProperties:
+ description: CustomTag defines a custom tag to add to each
+ span.
properties:
environment:
description: |-
@@ -2325,6 +2327,22 @@ spec:
required:
- name
type: object
+ formatter:
+ description: |-
+ Formatter adds value using formatter to each span.
+ It's required when the type is "Formatter".
+ properties:
+ value:
+ description: |-
+ Values defines the formatter value to use,
+ same [formatter](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) as HTTP access logging
+ (e.g. %REQUESTED_SERVER_NAME%).
+ Unknown specifier values are replaced
+ with the empty string.
+ type: string
+ required:
+ - value
+ type: object
literal:
description: |-
Literal adds hard-coded value to each span.
@@ -2360,10 +2378,23 @@ spec:
- Literal
- Environment
- RequestHeader
+ - Formatter
type: string
required:
- type
type: object
+ x-kubernetes-validations:
+ - message: formatter cannot be null when using Formatter
+ type.
+ rule: self.type != 'Formatter' || has(self.formatter)
+ - message: requestHeader cannot be null when using RequestHeader
+ type.
+ rule: self.type != 'RequestHeader' || has(self.requestHeader)
+ - message: environment cannot be null when using Environment
+ type.
+ rule: self.type != 'Environment' || has(self.environment)
+ - message: literal cannot be null when using Literal type.
+ rule: self.type != 'Literal' || has(self.literal)
description: |-
CustomTags defines the custom tags to add to each span.
If provider is kubernetes, pod name and namespace are added by default.
diff --git a/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml
index 37c9034f7f8..9e9c9bd18e9 100644
--- a/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml
+++ b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml
@@ -14816,6 +14816,8 @@ spec:
properties:
customTags:
additionalProperties:
+ description: CustomTag defines a custom tag to add to each
+ span.
properties:
environment:
description: |-
@@ -14833,6 +14835,22 @@ spec:
required:
- name
type: object
+ formatter:
+ description: |-
+ Formatter adds value using formatter to each span.
+ It's required when the type is "Formatter".
+ properties:
+ value:
+ description: |-
+ Values defines the formatter value to use,
+ same [formatter](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) as HTTP access logging
+ (e.g. %REQUESTED_SERVER_NAME%).
+ Unknown specifier values are replaced
+ with the empty string.
+ type: string
+ required:
+ - value
+ type: object
literal:
description: |-
Literal adds hard-coded value to each span.
@@ -14868,10 +14886,23 @@ spec:
- Literal
- Environment
- RequestHeader
+ - Formatter
type: string
required:
- type
type: object
+ x-kubernetes-validations:
+ - message: formatter cannot be null when using Formatter
+ type.
+ rule: self.type != 'Formatter' || has(self.formatter)
+ - message: requestHeader cannot be null when using RequestHeader
+ type.
+ rule: self.type != 'RequestHeader' || has(self.requestHeader)
+ - message: environment cannot be null when using Environment
+ type.
+ rule: self.type != 'Environment' || has(self.environment)
+ - message: literal cannot be null when using Literal type.
+ rule: self.type != 'Literal' || has(self.literal)
description: |-
CustomTags defines the custom tags to add to each span.
If provider is kubernetes, pod name and namespace are added by default.
diff --git a/site/content/en/latest/api/extension_types.md b/site/content/en/latest/api/extension_types.md
index 5b47c218d71..c69a81a5c11 100644
--- a/site/content/en/latest/api/extension_types.md
+++ b/site/content/en/latest/api/extension_types.md
@@ -1098,7 +1098,7 @@ _Appears in:_
-
+CustomTag defines a custom tag to add to each span.
_Appears in:_
- [ProxyTracing](#proxytracing)
@@ -1110,6 +1110,7 @@ _Appears in:_
| `literal` | _[LiteralCustomTag](#literalcustomtag)_ | true | | Literal adds hard-coded value to each span.
It's required when the type is "Literal". |
| `environment` | _[EnvironmentCustomTag](#environmentcustomtag)_ | true | | Environment adds value from environment variable to each span.
It's required when the type is "Environment". |
| `requestHeader` | _[RequestHeaderCustomTag](#requestheadercustomtag)_ | true | | RequestHeader adds value from request header to each span.
It's required when the type is "RequestHeader". |
+| `formatter` | _[FormatterCustomTag](#formattercustomtag)_ | false | | Formatter adds value using formatter to each span.
It's required when the type is "Formatter". |
#### CustomTagType
@@ -1126,6 +1127,7 @@ _Appears in:_
| `Literal` | CustomTagTypeLiteral adds hard-coded value to each span.
|
| `Environment` | CustomTagTypeEnvironment adds value from environment variable to each span.
|
| `RequestHeader` | CustomTagTypeRequestHeader adds value from request header to each span.
|
+| `Formatter` | CustomTagTypeFormatter adds value using formatter to each span.
|
#### DNS
@@ -2147,6 +2149,20 @@ _Appears in:_
| --- | --- | --- | --- | --- |
+#### FormatterCustomTag
+
+
+
+
+
+_Appears in:_
+- [CustomTag](#customtag)
+
+| Field | Type | Required | Default | Description |
+| --- | --- | --- | --- | --- |
+| `value` | _string_ | true | | Values defines the formatter value to use,
same [formatter](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) as HTTP access logging
(e.g. %REQUESTED_SERVER_NAME%).
Unknown specifier values are replaced
with the empty string. |
+
+
#### GRPCActiveHealthChecker
diff --git a/test/cel-validation/envoyproxy_test.go b/test/cel-validation/envoyproxy_test.go
index 613169ca97f..fde56f15869 100644
--- a/test/cel-validation/envoyproxy_test.go
+++ b/test/cel-validation/envoyproxy_test.go
@@ -1886,6 +1886,107 @@ func TestEnvoyProxyProvider(t *testing.T) {
},
wantErrors: []string{"ImageRepository must contain only allowed characters and must not include a tag."},
},
+ {
+ desc: "tracing-tags",
+ mutate: func(envoy *egv1a1.EnvoyProxy) {
+ envoy.Spec = egv1a1.EnvoyProxySpec{
+ Telemetry: &egv1a1.ProxyTelemetry{
+ Tracing: &egv1a1.ProxyTracing{
+ Provider: egv1a1.TracingProvider{
+ Type: egv1a1.TracingProviderTypeOpenTelemetry,
+ BackendCluster: egv1a1.BackendCluster{
+ BackendRefs: []egv1a1.BackendRef{
+ {
+ BackendObjectReference: gwapiv1.BackendObjectReference{
+ Name: "fake-service",
+ Kind: ptr.To(gwapiv1.Kind("Service")),
+ Port: ptr.To(gwapiv1.PortNumber(8080)),
+ },
+ },
+ },
+ },
+ },
+ CustomTags: map[string]egv1a1.CustomTag{
+ "literal-tag": {
+ Type: egv1a1.CustomTagTypeLiteral,
+ Literal: &egv1a1.LiteralCustomTag{},
+ },
+ "environ-tag": {
+ Type: egv1a1.CustomTagTypeEnvironment,
+ Environment: &egv1a1.EnvironmentCustomTag{
+ Name: "SOME_ENV_VAR",
+ },
+ },
+ "req-tag": {
+ Type: egv1a1.CustomTagTypeRequestHeader,
+ RequestHeader: &egv1a1.RequestHeaderCustomTag{
+ Name: "request-header-1",
+ },
+ },
+ "formatter-tag": {
+ Type: egv1a1.CustomTagTypeFormatter,
+ Formatter: &egv1a1.FormatterCustomTag{
+ Value: "%REQ(req-header-1)%",
+ },
+ },
+ },
+ },
+ },
+ }
+ },
+ wantErrors: []string{},
+ },
+ {
+ desc: "tracing-invalid-tags",
+ mutate: func(envoy *egv1a1.EnvoyProxy) {
+ envoy.Spec = egv1a1.EnvoyProxySpec{
+ Telemetry: &egv1a1.ProxyTelemetry{
+ Tracing: &egv1a1.ProxyTracing{
+ Provider: egv1a1.TracingProvider{
+ Type: egv1a1.TracingProviderTypeOpenTelemetry,
+ BackendCluster: egv1a1.BackendCluster{
+ BackendRefs: []egv1a1.BackendRef{
+ {
+ BackendObjectReference: gwapiv1.BackendObjectReference{
+ Name: "fake-service",
+ Kind: ptr.To(gwapiv1.Kind("Service")),
+ Port: ptr.To(gwapiv1.PortNumber(8080)),
+ },
+ },
+ },
+ },
+ },
+ CustomTags: map[string]egv1a1.CustomTag{
+ "literal-tag": {
+ Type: egv1a1.CustomTagTypeLiteral,
+ Environment: &egv1a1.EnvironmentCustomTag{
+ Name: "SOME_ENV_VAR",
+ },
+ },
+ "environ-tag": {
+ Type: egv1a1.CustomTagTypeEnvironment,
+ Literal: &egv1a1.LiteralCustomTag{},
+ },
+ "req-tag": {
+ Type: egv1a1.CustomTagTypeRequestHeader,
+ Literal: &egv1a1.LiteralCustomTag{},
+ },
+ "formatter-tag": {
+ Type: egv1a1.CustomTagTypeFormatter,
+ Literal: &egv1a1.LiteralCustomTag{},
+ },
+ },
+ },
+ },
+ }
+ },
+ wantErrors: []string{
+ "formatter cannot be null when using Formatter type",
+ "requestHeader cannot be null when using RequestHeader type",
+ "environment cannot be null when using Environment type",
+ "literal cannot be null when using Literal type",
+ },
+ },
}
for _, tc := range cases {
diff --git a/test/helm/gateway-crds-helm/all.out.yaml b/test/helm/gateway-crds-helm/all.out.yaml
index 18d794c24a3..e324834162c 100644
--- a/test/helm/gateway-crds-helm/all.out.yaml
+++ b/test/helm/gateway-crds-helm/all.out.yaml
@@ -23442,6 +23442,8 @@ spec:
properties:
customTags:
additionalProperties:
+ description: CustomTag defines a custom tag to add to each
+ span.
properties:
environment:
description: |-
@@ -23459,6 +23461,22 @@ spec:
required:
- name
type: object
+ formatter:
+ description: |-
+ Formatter adds value using formatter to each span.
+ It's required when the type is "Formatter".
+ properties:
+ value:
+ description: |-
+ Values defines the formatter value to use,
+ same [formatter](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) as HTTP access logging
+ (e.g. %REQUESTED_SERVER_NAME%).
+ Unknown specifier values are replaced
+ with the empty string.
+ type: string
+ required:
+ - value
+ type: object
literal:
description: |-
Literal adds hard-coded value to each span.
@@ -23494,10 +23512,23 @@ spec:
- Literal
- Environment
- RequestHeader
+ - Formatter
type: string
required:
- type
type: object
+ x-kubernetes-validations:
+ - message: formatter cannot be null when using Formatter
+ type.
+ rule: self.type != 'Formatter' || has(self.formatter)
+ - message: requestHeader cannot be null when using RequestHeader
+ type.
+ rule: self.type != 'RequestHeader' || has(self.requestHeader)
+ - message: environment cannot be null when using Environment
+ type.
+ rule: self.type != 'Environment' || has(self.environment)
+ - message: literal cannot be null when using Literal type.
+ rule: self.type != 'Literal' || has(self.literal)
description: |-
CustomTags defines the custom tags to add to each span.
If provider is kubernetes, pod name and namespace are added by default.
@@ -43154,6 +43185,8 @@ spec:
properties:
customTags:
additionalProperties:
+ description: CustomTag defines a custom tag to add to each
+ span.
properties:
environment:
description: |-
@@ -43171,6 +43204,22 @@ spec:
required:
- name
type: object
+ formatter:
+ description: |-
+ Formatter adds value using formatter to each span.
+ It's required when the type is "Formatter".
+ properties:
+ value:
+ description: |-
+ Values defines the formatter value to use,
+ same [formatter](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) as HTTP access logging
+ (e.g. %REQUESTED_SERVER_NAME%).
+ Unknown specifier values are replaced
+ with the empty string.
+ type: string
+ required:
+ - value
+ type: object
literal:
description: |-
Literal adds hard-coded value to each span.
@@ -43206,10 +43255,23 @@ spec:
- Literal
- Environment
- RequestHeader
+ - Formatter
type: string
required:
- type
type: object
+ x-kubernetes-validations:
+ - message: formatter cannot be null when using Formatter
+ type.
+ rule: self.type != 'Formatter' || has(self.formatter)
+ - message: requestHeader cannot be null when using RequestHeader
+ type.
+ rule: self.type != 'RequestHeader' || has(self.requestHeader)
+ - message: environment cannot be null when using Environment
+ type.
+ rule: self.type != 'Environment' || has(self.environment)
+ - message: literal cannot be null when using Literal type.
+ rule: self.type != 'Literal' || has(self.literal)
description: |-
CustomTags defines the custom tags to add to each span.
If provider is kubernetes, pod name and namespace are added by default.
diff --git a/test/helm/gateway-crds-helm/envoy-gateway-crds.out.yaml b/test/helm/gateway-crds-helm/envoy-gateway-crds.out.yaml
index e4a2010020e..5cf3f40b935 100644
--- a/test/helm/gateway-crds-helm/envoy-gateway-crds.out.yaml
+++ b/test/helm/gateway-crds-helm/envoy-gateway-crds.out.yaml
@@ -2786,6 +2786,8 @@ spec:
properties:
customTags:
additionalProperties:
+ description: CustomTag defines a custom tag to add to each
+ span.
properties:
environment:
description: |-
@@ -2803,6 +2805,22 @@ spec:
required:
- name
type: object
+ formatter:
+ description: |-
+ Formatter adds value using formatter to each span.
+ It's required when the type is "Formatter".
+ properties:
+ value:
+ description: |-
+ Values defines the formatter value to use,
+ same [formatter](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) as HTTP access logging
+ (e.g. %REQUESTED_SERVER_NAME%).
+ Unknown specifier values are replaced
+ with the empty string.
+ type: string
+ required:
+ - value
+ type: object
literal:
description: |-
Literal adds hard-coded value to each span.
@@ -2838,10 +2856,23 @@ spec:
- Literal
- Environment
- RequestHeader
+ - Formatter
type: string
required:
- type
type: object
+ x-kubernetes-validations:
+ - message: formatter cannot be null when using Formatter
+ type.
+ rule: self.type != 'Formatter' || has(self.formatter)
+ - message: requestHeader cannot be null when using RequestHeader
+ type.
+ rule: self.type != 'RequestHeader' || has(self.requestHeader)
+ - message: environment cannot be null when using Environment
+ type.
+ rule: self.type != 'Environment' || has(self.environment)
+ - message: literal cannot be null when using Literal type.
+ rule: self.type != 'Literal' || has(self.literal)
description: |-
CustomTags defines the custom tags to add to each span.
If provider is kubernetes, pod name and namespace are added by default.
@@ -22498,6 +22529,8 @@ spec:
properties:
customTags:
additionalProperties:
+ description: CustomTag defines a custom tag to add to each
+ span.
properties:
environment:
description: |-
@@ -22515,6 +22548,22 @@ spec:
required:
- name
type: object
+ formatter:
+ description: |-
+ Formatter adds value using formatter to each span.
+ It's required when the type is "Formatter".
+ properties:
+ value:
+ description: |-
+ Values defines the formatter value to use,
+ same [formatter](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) as HTTP access logging
+ (e.g. %REQUESTED_SERVER_NAME%).
+ Unknown specifier values are replaced
+ with the empty string.
+ type: string
+ required:
+ - value
+ type: object
literal:
description: |-
Literal adds hard-coded value to each span.
@@ -22550,10 +22599,23 @@ spec:
- Literal
- Environment
- RequestHeader
+ - Formatter
type: string
required:
- type
type: object
+ x-kubernetes-validations:
+ - message: formatter cannot be null when using Formatter
+ type.
+ rule: self.type != 'Formatter' || has(self.formatter)
+ - message: requestHeader cannot be null when using RequestHeader
+ type.
+ rule: self.type != 'RequestHeader' || has(self.requestHeader)
+ - message: environment cannot be null when using Environment
+ type.
+ rule: self.type != 'Environment' || has(self.environment)
+ - message: literal cannot be null when using Literal type.
+ rule: self.type != 'Literal' || has(self.literal)
description: |-
CustomTags defines the custom tags to add to each span.
If provider is kubernetes, pod name and namespace are added by default.