diff --git a/api/gloo/gloo/external/envoy/config/trace/v3/opentelemetry.proto b/api/gloo/gloo/external/envoy/config/trace/v3/opentelemetry.proto index 3977982dd..6ea896b83 100644 --- a/api/gloo/gloo/external/envoy/config/trace/v3/opentelemetry.proto +++ b/api/gloo/gloo/external/envoy/config/trace/v3/opentelemetry.proto @@ -31,6 +31,11 @@ message OpenTelemetryConfig { // OpenTelemetry agent string cluster_name = 2; } + + // Optional. If set, the service name will be used as the service name in the trace. + // If this is not set it will be automatically set to the name of the + // listener + the namespace of the Gateway object + string service_name = 3; } option go_package = "github.com/solo-io/solo-apis/pkg/api/gloo.solo.io/external/envoy/config/trace/v3"; diff --git a/api/gloo/gloo/v1/options/tracing/tracing.proto b/api/gloo/gloo/v1/options/tracing/tracing.proto index da7fab12c..1d5ae6c2a 100644 --- a/api/gloo/gloo/v1/options/tracing/tracing.proto +++ b/api/gloo/gloo/v1/options/tracing/tracing.proto @@ -43,6 +43,13 @@ message ListenerTracingSettings { repeated TracingTagEnvironmentVariable environment_variables_for_tags = 6; // Optional. If specified, Envoy will include the literals with the given tag as tracing tags. repeated TracingTagLiteral literals_for_tags = 7; + // Optional. If specified, Envoy will include tags from the dynamic metadata. + repeated TracingTagMetadata metadata_for_tags = 11; + + // Optional + // Create separate tracing span for each upstream request if true. And if this flag is set to true, the tracing provider will assume that Envoy + // will be independent hop in the trace chain and may set span type to client or server based on this flag. + bool spawn_upstream_span = 10; } // Contains settings for configuring Envoy's tracing capabilities at the route level. @@ -97,3 +104,36 @@ message TracingTagLiteral { // Static literal value to populate the tag value. google.protobuf.StringValue value = 2; } + +// Requests can produce traces with custom tags. +// TracingTagMetadata defines a dynamic metadata tag which gets added as custom tag. +message TracingTagMetadata { + enum Kind { + // The metadata is extracted from the stream metadata. + REQUEST = 0; + // The metadata is extracted from the endpoint metadata. + ENDPOINT = 1; + } + // Used to populate the tag name. + string tag = 1; + // The kind of metadata to extract the value from + Kind kind = 2; + + message MetadataValue { + // The namespace to extract the value from the metadata. + // If empty will default to JWT principal namespace. + string namespace = 1; + // The key to extract the value from the metadata. + // For example, `principal.iss` or `principal.sub` to extract those claims from the JWT ns + string key = 2; + // The delimiter to use when specifying nested fields. + // Default is `.`. + // This is commonly set to `.`, allowing for nested fields names of the form + // `parent.child.grandchild` + string nested_field_delimiter = 3; + } + // The metadata value to extract the tag value from. + MetadataValue value = 3; + // When no valid metadata is found, the tag value would be populated with this default value if specified, otherwise no tag would be populated. + string default_value = 4; +} diff --git a/pkg/api/gateway.gloo.solo.io/v1alpha1/gateway_parameters_types.go b/pkg/api/gateway.gloo.solo.io/v1alpha1/gateway_parameters_types.go index 7daba1f45..4bed30672 100644 --- a/pkg/api/gateway.gloo.solo.io/v1alpha1/gateway_parameters_types.go +++ b/pkg/api/gateway.gloo.solo.io/v1alpha1/gateway_parameters_types.go @@ -603,6 +603,18 @@ type AiExtension struct { // metadataKey: "principal:iss" // ``` Stats *AiExtensionStats `json:"stats,omitempty"` + + // Tracing configuration for the AI Extension. + // +optional + // Example: + // ```yaml + // tracing: + // grpc: + // host: "otel-collector.otel-system.svc" + // port: 4317 + // insecure: true + // ``` + Tracing *AIExtensionTracing `json:"tracing,omitempty"` } func (in *AiExtension) GetEnabled() *bool { @@ -726,6 +738,63 @@ func (in *CustomLabel) GetKeyDelimiter() *string { return in.KeyDelimiter } +func (in *AiExtension) GetTracing() *AIExtensionTracing { + if in == nil { + return nil + } + return in.Tracing +} + +type AIExtensionTracing struct { + // gRPC Config for the OTLP collector. + // Set this to use gRPC streaming of traces to the OTLP collector. + // +optional + Grpc *AIExtensionTracingGrpc `json:"grpc,omitempty"` + + // Whether to use insecure connection to the OTLP endpoint. + // This will be false by defautl as HTTPS is recommended. + // +optional + Insecure bool `json:"insecure,omitempty"` +} + +func (in *AIExtensionTracing) GetGrpc() *AIExtensionTracingGrpc { + if in == nil { + return nil + } + return in.Grpc +} + +func (in *AIExtensionTracing) GetInsecure() bool { + if in == nil { + return false + } + return in.Insecure +} + +type AIExtensionTracingGrpc struct { + // The gRPC endpoint for the OTLP collector. + // +kubebuilder:validation:MinLength=1 + Host string `json:"host"` + + // The port for the OTLP collector. + // +kubebuilder:validation:Minimum=1 + Port uint32 `json:"port"` +} + +func (in *AIExtensionTracingGrpc) GetHost() string { + if in == nil { + return "" + } + return in.Host +} + +func (in *AIExtensionTracingGrpc) GetPort() uint32 { + if in == nil { + return 0 + } + return in.Port +} + func init() { SchemeBuilder.Register(&GatewayParameters{}, &GatewayParametersList{}) } diff --git a/pkg/api/gateway.gloo.solo.io/v1alpha1/zz_generated.deepcopy.go b/pkg/api/gateway.gloo.solo.io/v1alpha1/zz_generated.deepcopy.go index 212c08e2b..b51e5d6ec 100644 --- a/pkg/api/gateway.gloo.solo.io/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/api/gateway.gloo.solo.io/v1alpha1/zz_generated.deepcopy.go @@ -9,6 +9,41 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AIExtensionTracing) DeepCopyInto(out *AIExtensionTracing) { + *out = *in + if in.Grpc != nil { + in, out := &in.Grpc, &out.Grpc + *out = new(AIExtensionTracingGrpc) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIExtensionTracing. +func (in *AIExtensionTracing) DeepCopy() *AIExtensionTracing { + if in == nil { + return nil + } + out := new(AIExtensionTracing) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AIExtensionTracingGrpc) DeepCopyInto(out *AIExtensionTracingGrpc) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIExtensionTracingGrpc. +func (in *AIExtensionTracingGrpc) DeepCopy() *AIExtensionTracingGrpc { + if in == nil { + return nil + } + out := new(AIExtensionTracingGrpc) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AiExtension) DeepCopyInto(out *AiExtension) { *out = *in @@ -59,6 +94,11 @@ func (in *AiExtension) DeepCopyInto(out *AiExtension) { *out = new(AiExtensionStats) (*in).DeepCopyInto(*out) } + if in.Tracing != nil { + in, out := &in.Tracing, &out.Tracing + *out = new(AIExtensionTracing) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AiExtension. diff --git a/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.clone.go b/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.clone.go index 35a8227c6..191f40ce2 100644 --- a/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.clone.go +++ b/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.clone.go @@ -35,6 +35,8 @@ func (m *OpenTelemetryConfig) Clone() proto.Message { } target = &OpenTelemetryConfig{} + target.ServiceName = m.GetServiceName() + switch m.CollectorCluster.(type) { case *OpenTelemetryConfig_CollectorUpstreamRef: diff --git a/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.equal.go b/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.equal.go index cbd02a621..7cffa5890 100644 --- a/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.equal.go +++ b/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.equal.go @@ -46,6 +46,10 @@ func (m *OpenTelemetryConfig) Equal(that interface{}) bool { return false } + if strings.Compare(m.GetServiceName(), target.GetServiceName()) != 0 { + return false + } + switch m.CollectorCluster.(type) { case *OpenTelemetryConfig_CollectorUpstreamRef: diff --git a/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.go b/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.go index f30f24b1c..91da0309e 100644 --- a/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.go +++ b/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.go @@ -39,6 +39,10 @@ type OpenTelemetryConfig struct { // *OpenTelemetryConfig_CollectorUpstreamRef // *OpenTelemetryConfig_ClusterName CollectorCluster isOpenTelemetryConfig_CollectorCluster `protobuf_oneof:"collector_cluster"` + // Optional. If set, the service name will be used as the service name in the trace. + // If this is not set it will be automatically set to the name of the + // listener + the namespace of the Gateway object + ServiceName string `protobuf:"bytes,3,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` } func (x *OpenTelemetryConfig) Reset() { @@ -94,6 +98,13 @@ func (x *OpenTelemetryConfig) GetClusterName() string { return "" } +func (x *OpenTelemetryConfig) GetServiceName() string { + if x != nil { + return x.ServiceName + } + return "" +} + type isOpenTelemetryConfig_CollectorCluster interface { isOpenTelemetryConfig_CollectorCluster() } @@ -135,7 +146,7 @@ var file_github_com_solo_io_solo_apis_api_gloo_gloo_external_envoy_config_trace_ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x69, 0x6f, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x6b, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x65, 0x78, 0x74, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x01, 0x0a, 0x13, + 0x6f, 0x2f, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf8, 0x01, 0x0a, 0x13, 0x4f, 0x70, 0x65, 0x6e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51, 0x0a, 0x16, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, @@ -144,26 +155,28 @@ var file_github_com_solo_io_solo_apis_api_gloo_gloo_external_envoy_config_trace_ 0x52, 0x14, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x66, 0x12, 0x23, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x31, 0x8a, 0xc8, 0xde, - 0x8e, 0x04, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x54, - 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x13, - 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x42, 0xdf, 0x01, 0xb8, 0xf5, 0x04, 0x01, 0xc0, 0xf5, 0x04, 0x01, 0xd0, 0xf5, - 0x04, 0x01, 0x82, 0x8a, 0xd7, 0xad, 0x04, 0x30, 0x12, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x72, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, - 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xe2, 0xb5, 0xdf, 0xcb, 0x07, 0x02, 0x10, 0x02, - 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x4f, - 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x69, 0x6f, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, - 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x74, 0x72, 0x61, - 0x63, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x31, + 0x8a, 0xc8, 0xde, 0x8e, 0x04, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x42, 0x13, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0xdf, 0x01, 0xb8, 0xf5, 0x04, 0x01, 0xc0, 0xf5, 0x04, + 0x01, 0xd0, 0xf5, 0x04, 0x01, 0x82, 0x8a, 0xd7, 0xad, 0x04, 0x30, 0x12, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, + 0x61, 0x63, 0x65, 0x72, 0x73, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, + 0x74, 0x72, 0x79, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0xe2, 0xb5, 0xdf, 0xcb, 0x07, + 0x02, 0x10, 0x02, 0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33, + 0x42, 0x12, 0x4f, 0x70, 0x65, 0x6e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x69, 0x6f, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, + 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6c, 0x6f, + 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.hash.go b/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.hash.go index 8610bd233..d7cb4815d 100644 --- a/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.hash.go +++ b/pkg/api/gloo.solo.io/external/envoy/config/trace/v3/opentelemetry.pb.hash.go @@ -38,6 +38,10 @@ func (m *OpenTelemetryConfig) Hash(hasher hash.Hash64) (uint64, error) { return 0, err } + if _, err = hasher.Write([]byte(m.GetServiceName())); err != nil { + return 0, err + } + switch m.CollectorCluster.(type) { case *OpenTelemetryConfig_CollectorUpstreamRef: diff --git a/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.clone.go b/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.clone.go index 5bc27bf1b..3f66bd830 100644 --- a/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.clone.go +++ b/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.clone.go @@ -88,6 +88,21 @@ func (m *ListenerTracingSettings) Clone() proto.Message { } } + if m.GetMetadataForTags() != nil { + target.MetadataForTags = make([]*TracingTagMetadata, len(m.GetMetadataForTags())) + for idx, v := range m.GetMetadataForTags() { + + if h, ok := interface{}(v).(clone.Cloner); ok { + target.MetadataForTags[idx] = h.Clone().(*TracingTagMetadata) + } else { + target.MetadataForTags[idx] = proto.Clone(v).(*TracingTagMetadata) + } + + } + } + + target.SpawnUpstreamSpan = m.GetSpawnUpstreamSpan() + switch m.ProviderConfig.(type) { case *ListenerTracingSettings_ZipkinConfig: @@ -248,3 +263,43 @@ func (m *TracingTagLiteral) Clone() proto.Message { return target } + +// Clone function +func (m *TracingTagMetadata) Clone() proto.Message { + var target *TracingTagMetadata + if m == nil { + return target + } + target = &TracingTagMetadata{} + + target.Tag = m.GetTag() + + target.Kind = m.GetKind() + + if h, ok := interface{}(m.GetValue()).(clone.Cloner); ok { + target.Value = h.Clone().(*TracingTagMetadata_MetadataValue) + } else { + target.Value = proto.Clone(m.GetValue()).(*TracingTagMetadata_MetadataValue) + } + + target.DefaultValue = m.GetDefaultValue() + + return target +} + +// Clone function +func (m *TracingTagMetadata_MetadataValue) Clone() proto.Message { + var target *TracingTagMetadata_MetadataValue + if m == nil { + return target + } + target = &TracingTagMetadata_MetadataValue{} + + target.Namespace = m.GetNamespace() + + target.Key = m.GetKey() + + target.NestedFieldDelimiter = m.GetNestedFieldDelimiter() + + return target +} diff --git a/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.equal.go b/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.equal.go index 1cae2eff4..80b1a2997 100644 --- a/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.equal.go +++ b/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.equal.go @@ -117,6 +117,27 @@ func (m *ListenerTracingSettings) Equal(that interface{}) bool { } + if len(m.GetMetadataForTags()) != len(target.GetMetadataForTags()) { + return false + } + for idx, v := range m.GetMetadataForTags() { + + if h, ok := interface{}(v).(equality.Equalizer); ok { + if !h.Equal(target.GetMetadataForTags()[idx]) { + return false + } + } else { + if !proto.Equal(v, target.GetMetadataForTags()[idx]) { + return false + } + } + + } + + if m.GetSpawnUpstreamSpan() != target.GetSpawnUpstreamSpan() { + return false + } + switch m.ProviderConfig.(type) { case *ListenerTracingSettings_ZipkinConfig: @@ -388,3 +409,85 @@ func (m *TracingTagLiteral) Equal(that interface{}) bool { return true } + +// Equal function +func (m *TracingTagMetadata) Equal(that interface{}) bool { + if that == nil { + return m == nil + } + + target, ok := that.(*TracingTagMetadata) + if !ok { + that2, ok := that.(TracingTagMetadata) + if ok { + target = &that2 + } else { + return false + } + } + if target == nil { + return m == nil + } else if m == nil { + return false + } + + if strings.Compare(m.GetTag(), target.GetTag()) != 0 { + return false + } + + if m.GetKind() != target.GetKind() { + return false + } + + if h, ok := interface{}(m.GetValue()).(equality.Equalizer); ok { + if !h.Equal(target.GetValue()) { + return false + } + } else { + if !proto.Equal(m.GetValue(), target.GetValue()) { + return false + } + } + + if strings.Compare(m.GetDefaultValue(), target.GetDefaultValue()) != 0 { + return false + } + + return true +} + +// Equal function +func (m *TracingTagMetadata_MetadataValue) Equal(that interface{}) bool { + if that == nil { + return m == nil + } + + target, ok := that.(*TracingTagMetadata_MetadataValue) + if !ok { + that2, ok := that.(TracingTagMetadata_MetadataValue) + if ok { + target = &that2 + } else { + return false + } + } + if target == nil { + return m == nil + } else if m == nil { + return false + } + + if strings.Compare(m.GetNamespace(), target.GetNamespace()) != 0 { + return false + } + + if strings.Compare(m.GetKey(), target.GetKey()) != 0 { + return false + } + + if strings.Compare(m.GetNestedFieldDelimiter(), target.GetNestedFieldDelimiter()) != 0 { + return false + } + + return true +} diff --git a/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.go b/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.go index ec2dc1bbb..ea8a474e2 100644 --- a/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.go +++ b/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.go @@ -26,6 +26,54 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type TracingTagMetadata_Kind int32 + +const ( + // The metadata is extracted from the stream metadata. + TracingTagMetadata_REQUEST TracingTagMetadata_Kind = 0 + // The metadata is extracted from the endpoint metadata. + TracingTagMetadata_ENDPOINT TracingTagMetadata_Kind = 1 +) + +// Enum value maps for TracingTagMetadata_Kind. +var ( + TracingTagMetadata_Kind_name = map[int32]string{ + 0: "REQUEST", + 1: "ENDPOINT", + } + TracingTagMetadata_Kind_value = map[string]int32{ + "REQUEST": 0, + "ENDPOINT": 1, + } +) + +func (x TracingTagMetadata_Kind) Enum() *TracingTagMetadata_Kind { + p := new(TracingTagMetadata_Kind) + *p = x + return p +} + +func (x TracingTagMetadata_Kind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TracingTagMetadata_Kind) Descriptor() protoreflect.EnumDescriptor { + return file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_enumTypes[0].Descriptor() +} + +func (TracingTagMetadata_Kind) Type() protoreflect.EnumType { + return &file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_enumTypes[0] +} + +func (x TracingTagMetadata_Kind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TracingTagMetadata_Kind.Descriptor instead. +func (TracingTagMetadata_Kind) EnumDescriptor() ([]byte, []int) { + return file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_rawDescGZIP(), []int{5, 0} +} + // Contains settings for configuring Envoy's tracing capabilities at the listener level. // See [here](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/observability/tracing.html) for additional information on Envoy's tracing capabilities. // See [here](https://docs.solo.io/gloo-edge/latest/guides/observability/tracing/) for additional information about configuring tracing with Gloo Edge. @@ -55,6 +103,12 @@ type ListenerTracingSettings struct { EnvironmentVariablesForTags []*TracingTagEnvironmentVariable `protobuf:"bytes,6,rep,name=environment_variables_for_tags,json=environmentVariablesForTags,proto3" json:"environment_variables_for_tags,omitempty"` // Optional. If specified, Envoy will include the literals with the given tag as tracing tags. LiteralsForTags []*TracingTagLiteral `protobuf:"bytes,7,rep,name=literals_for_tags,json=literalsForTags,proto3" json:"literals_for_tags,omitempty"` + // Optional. If specified, Envoy will include tags from the dynamic metadata. + MetadataForTags []*TracingTagMetadata `protobuf:"bytes,11,rep,name=metadata_for_tags,json=metadataForTags,proto3" json:"metadata_for_tags,omitempty"` + // Optional + // Create separate tracing span for each upstream request if true. And if this flag is set to true, the tracing provider will assume that Envoy + // will be independent hop in the trace chain and may set span type to client or server based on this flag. + SpawnUpstreamSpan bool `protobuf:"varint,10,opt,name=spawn_upstream_span,json=spawnUpstreamSpan,proto3" json:"spawn_upstream_span,omitempty"` } func (x *ListenerTracingSettings) Reset() { @@ -159,6 +213,20 @@ func (x *ListenerTracingSettings) GetLiteralsForTags() []*TracingTagLiteral { return nil } +func (x *ListenerTracingSettings) GetMetadataForTags() []*TracingTagMetadata { + if x != nil { + return x.MetadataForTags + } + return nil +} + +func (x *ListenerTracingSettings) GetSpawnUpstreamSpan() bool { + if x != nil { + return x.SpawnUpstreamSpan + } + return false +} + type isListenerTracingSettings_ProviderConfig interface { isListenerTracingSettings_ProviderConfig() } @@ -461,6 +529,154 @@ func (x *TracingTagLiteral) GetValue() *wrappers.StringValue { return nil } +// Requests can produce traces with custom tags. +// TracingTagMetadata defines a dynamic metadata tag which gets added as custom tag. +type TracingTagMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Used to populate the tag name. + Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` + // The kind of metadata to extract the value from + Kind TracingTagMetadata_Kind `protobuf:"varint,2,opt,name=kind,proto3,enum=tracing.options.gloo.solo.io.TracingTagMetadata_Kind" json:"kind,omitempty"` + // The metadata value to extract the tag value from. + Value *TracingTagMetadata_MetadataValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + // When no valid metadata is found, the tag value would be populated with this default value if specified, otherwise no tag would be populated. + DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` +} + +func (x *TracingTagMetadata) Reset() { + *x = TracingTagMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TracingTagMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TracingTagMetadata) ProtoMessage() {} + +func (x *TracingTagMetadata) ProtoReflect() protoreflect.Message { + mi := &file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_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 TracingTagMetadata.ProtoReflect.Descriptor instead. +func (*TracingTagMetadata) Descriptor() ([]byte, []int) { + return file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_rawDescGZIP(), []int{5} +} + +func (x *TracingTagMetadata) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +func (x *TracingTagMetadata) GetKind() TracingTagMetadata_Kind { + if x != nil { + return x.Kind + } + return TracingTagMetadata_REQUEST +} + +func (x *TracingTagMetadata) GetValue() *TracingTagMetadata_MetadataValue { + if x != nil { + return x.Value + } + return nil +} + +func (x *TracingTagMetadata) GetDefaultValue() string { + if x != nil { + return x.DefaultValue + } + return "" +} + +type TracingTagMetadata_MetadataValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The namespace to extract the value from the metadata. + // If empty will default to JWT principal namespace. + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // The key to extract the value from the metadata. + // For example, `principal.iss` or `principal.sub` to extract those claims from the JWT ns + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // The delimiter to use when specifying nested fields. + // Default is `.`. + // This is commonly set to `.`, allowing for nested fields names of the form + // `parent.child.grandchild` + NestedFieldDelimiter string `protobuf:"bytes,3,opt,name=nested_field_delimiter,json=nestedFieldDelimiter,proto3" json:"nested_field_delimiter,omitempty"` +} + +func (x *TracingTagMetadata_MetadataValue) Reset() { + *x = TracingTagMetadata_MetadataValue{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TracingTagMetadata_MetadataValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TracingTagMetadata_MetadataValue) ProtoMessage() {} + +func (x *TracingTagMetadata_MetadataValue) ProtoReflect() protoreflect.Message { + mi := &file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_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 TracingTagMetadata_MetadataValue.ProtoReflect.Descriptor instead. +func (*TracingTagMetadata_MetadataValue) Descriptor() ([]byte, []int) { + return file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_rawDescGZIP(), []int{5, 0} +} + +func (x *TracingTagMetadata_MetadataValue) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *TracingTagMetadata_MetadataValue) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *TracingTagMetadata_MetadataValue) GetNestedFieldDelimiter() string { + if x != nil { + return x.NestedFieldDelimiter + } + return "" +} + var File_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto protoreflect.FileDescriptor var file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_rawDesc = []byte{ @@ -501,7 +717,7 @@ var file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_p 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x69, 0x6f, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x6b, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x66, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xec, 0x06, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x07, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x55, 0x0a, 0x18, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, @@ -555,65 +771,98 @@ var file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_p 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x0f, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x73, 0x46, 0x6f, 0x72, 0x54, 0x61, 0x67, 0x73, - 0x42, 0x11, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x22, 0xd8, 0x01, 0x0a, 0x14, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x72, 0x61, - 0x63, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x29, 0x0a, 0x10, - 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x5b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, - 0x6f, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, - 0x65, 0x73, 0x52, 0x10, 0x74, 0x72, 0x61, 0x63, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x61, 0x67, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x22, 0x99, - 0x02, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, - 0x67, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x18, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x16, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x55, 0x0a, 0x18, 0x72, 0x61, - 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, - 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x16, 0x72, 0x61, 0x6e, 0x64, 0x6f, - 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, - 0x65, 0x12, 0x57, 0x0a, 0x19, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x17, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x22, 0xc4, 0x01, 0x0a, 0x1d, 0x54, - 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2e, 0x0a, 0x03, - 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x30, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, - 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x77, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x4c, - 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, + 0x12, 0x5c, 0x0a, 0x11, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x6f, 0x72, + 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x74, 0x72, + 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, + 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, + 0x6e, 0x67, 0x54, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x6f, 0x72, 0x54, 0x61, 0x67, 0x73, 0x12, 0x2e, + 0x0a, 0x13, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x73, 0x70, 0x61, + 0x77, 0x6e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x70, 0x61, 0x6e, 0x42, 0x11, + 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x22, 0xd8, 0x01, 0x0a, 0x14, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x72, 0x61, 0x63, 0x69, + 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x5b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x70, + 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, + 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x10, 0x74, 0x72, 0x61, 0x63, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, + 0x65, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x22, 0x99, 0x02, 0x0a, + 0x10, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, + 0x73, 0x12, 0x55, 0x0a, 0x18, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x16, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x55, 0x0a, 0x18, 0x72, 0x61, 0x6e, 0x64, + 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, + 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, + 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x16, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, + 0x57, 0x0a, 0x19, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x17, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x50, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x22, 0xc4, 0x01, 0x0a, 0x1d, 0x54, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2e, 0x0a, 0x03, 0x74, 0x61, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0d, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x52, 0xb8, 0xf5, 0x04, 0x01, - 0xc0, 0xf5, 0x04, 0x01, 0xd0, 0xf5, 0x04, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x69, 0x6f, 0x2f, 0x73, 0x6f, 0x6c, - 0x6f, 0x2d, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, - 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x77, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x4c, 0x69, 0x74, + 0x65, 0x72, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x03, 0x74, 0x61, 0x67, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x86, 0x03, 0x0a, 0x12, 0x54, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, + 0x67, 0x12, 0x49, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x35, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x54, + 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x54, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x74, 0x72, + 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x67, 0x6c, + 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, 0x69, 0x6f, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, + 0x6e, 0x67, 0x54, 0x61, 0x67, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x75, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x16, 0x6e, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x22, 0x21, + 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, + 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, 0x44, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x10, + 0x01, 0x42, 0x52, 0xb8, 0xf5, 0x04, 0x01, 0xc0, 0xf5, 0x04, 0x01, 0xd0, 0xf5, 0x04, 0x01, 0x5a, + 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, + 0x2d, 0x69, 0x6f, 0x2f, 0x73, 0x6f, 0x6c, 0x6f, 0x2d, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6c, 0x6f, 0x6f, 0x2e, 0x73, 0x6f, 0x6c, 0x6f, 0x2e, + 0x69, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, + 0x61, 0x63, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -628,46 +877,53 @@ func file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_ return file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_rawDescData } -var file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_goTypes = []interface{}{ - (*ListenerTracingSettings)(nil), // 0: tracing.options.gloo.solo.io.ListenerTracingSettings - (*RouteTracingSettings)(nil), // 1: tracing.options.gloo.solo.io.RouteTracingSettings - (*TracePercentages)(nil), // 2: tracing.options.gloo.solo.io.TracePercentages - (*TracingTagEnvironmentVariable)(nil), // 3: tracing.options.gloo.solo.io.TracingTagEnvironmentVariable - (*TracingTagLiteral)(nil), // 4: tracing.options.gloo.solo.io.TracingTagLiteral - (*wrappers.StringValue)(nil), // 5: google.protobuf.StringValue - (*wrappers.BoolValue)(nil), // 6: google.protobuf.BoolValue - (*v3.ZipkinConfig)(nil), // 7: solo.io.envoy.config.trace.v3.ZipkinConfig - (*v3.DatadogConfig)(nil), // 8: solo.io.envoy.config.trace.v3.DatadogConfig - (*v3.OpenTelemetryConfig)(nil), // 9: solo.io.envoy.config.trace.v3.OpenTelemetryConfig - (*v3.OpenCensusConfig)(nil), // 10: solo.io.envoy.config.trace.v3.OpenCensusConfig - (*wrappers.FloatValue)(nil), // 11: google.protobuf.FloatValue + (TracingTagMetadata_Kind)(0), // 0: tracing.options.gloo.solo.io.TracingTagMetadata.Kind + (*ListenerTracingSettings)(nil), // 1: tracing.options.gloo.solo.io.ListenerTracingSettings + (*RouteTracingSettings)(nil), // 2: tracing.options.gloo.solo.io.RouteTracingSettings + (*TracePercentages)(nil), // 3: tracing.options.gloo.solo.io.TracePercentages + (*TracingTagEnvironmentVariable)(nil), // 4: tracing.options.gloo.solo.io.TracingTagEnvironmentVariable + (*TracingTagLiteral)(nil), // 5: tracing.options.gloo.solo.io.TracingTagLiteral + (*TracingTagMetadata)(nil), // 6: tracing.options.gloo.solo.io.TracingTagMetadata + (*TracingTagMetadata_MetadataValue)(nil), // 7: tracing.options.gloo.solo.io.TracingTagMetadata.MetadataValue + (*wrappers.StringValue)(nil), // 8: google.protobuf.StringValue + (*wrappers.BoolValue)(nil), // 9: google.protobuf.BoolValue + (*v3.ZipkinConfig)(nil), // 10: solo.io.envoy.config.trace.v3.ZipkinConfig + (*v3.DatadogConfig)(nil), // 11: solo.io.envoy.config.trace.v3.DatadogConfig + (*v3.OpenTelemetryConfig)(nil), // 12: solo.io.envoy.config.trace.v3.OpenTelemetryConfig + (*v3.OpenCensusConfig)(nil), // 13: solo.io.envoy.config.trace.v3.OpenCensusConfig + (*wrappers.FloatValue)(nil), // 14: google.protobuf.FloatValue } var file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_depIdxs = []int32{ - 5, // 0: tracing.options.gloo.solo.io.ListenerTracingSettings.request_headers_for_tags:type_name -> google.protobuf.StringValue - 6, // 1: tracing.options.gloo.solo.io.ListenerTracingSettings.verbose:type_name -> google.protobuf.BoolValue - 2, // 2: tracing.options.gloo.solo.io.ListenerTracingSettings.trace_percentages:type_name -> tracing.options.gloo.solo.io.TracePercentages - 7, // 3: tracing.options.gloo.solo.io.ListenerTracingSettings.zipkin_config:type_name -> solo.io.envoy.config.trace.v3.ZipkinConfig - 8, // 4: tracing.options.gloo.solo.io.ListenerTracingSettings.datadog_config:type_name -> solo.io.envoy.config.trace.v3.DatadogConfig - 9, // 5: tracing.options.gloo.solo.io.ListenerTracingSettings.open_telemetry_config:type_name -> solo.io.envoy.config.trace.v3.OpenTelemetryConfig - 10, // 6: tracing.options.gloo.solo.io.ListenerTracingSettings.open_census_config:type_name -> solo.io.envoy.config.trace.v3.OpenCensusConfig - 3, // 7: tracing.options.gloo.solo.io.ListenerTracingSettings.environment_variables_for_tags:type_name -> tracing.options.gloo.solo.io.TracingTagEnvironmentVariable - 4, // 8: tracing.options.gloo.solo.io.ListenerTracingSettings.literals_for_tags:type_name -> tracing.options.gloo.solo.io.TracingTagLiteral - 2, // 9: tracing.options.gloo.solo.io.RouteTracingSettings.trace_percentages:type_name -> tracing.options.gloo.solo.io.TracePercentages - 6, // 10: tracing.options.gloo.solo.io.RouteTracingSettings.propagate:type_name -> google.protobuf.BoolValue - 11, // 11: tracing.options.gloo.solo.io.TracePercentages.client_sample_percentage:type_name -> google.protobuf.FloatValue - 11, // 12: tracing.options.gloo.solo.io.TracePercentages.random_sample_percentage:type_name -> google.protobuf.FloatValue - 11, // 13: tracing.options.gloo.solo.io.TracePercentages.overall_sample_percentage:type_name -> google.protobuf.FloatValue - 5, // 14: tracing.options.gloo.solo.io.TracingTagEnvironmentVariable.tag:type_name -> google.protobuf.StringValue - 5, // 15: tracing.options.gloo.solo.io.TracingTagEnvironmentVariable.name:type_name -> google.protobuf.StringValue - 5, // 16: tracing.options.gloo.solo.io.TracingTagEnvironmentVariable.default_value:type_name -> google.protobuf.StringValue - 5, // 17: tracing.options.gloo.solo.io.TracingTagLiteral.tag:type_name -> google.protobuf.StringValue - 5, // 18: tracing.options.gloo.solo.io.TracingTagLiteral.value:type_name -> google.protobuf.StringValue - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 8, // 0: tracing.options.gloo.solo.io.ListenerTracingSettings.request_headers_for_tags:type_name -> google.protobuf.StringValue + 9, // 1: tracing.options.gloo.solo.io.ListenerTracingSettings.verbose:type_name -> google.protobuf.BoolValue + 3, // 2: tracing.options.gloo.solo.io.ListenerTracingSettings.trace_percentages:type_name -> tracing.options.gloo.solo.io.TracePercentages + 10, // 3: tracing.options.gloo.solo.io.ListenerTracingSettings.zipkin_config:type_name -> solo.io.envoy.config.trace.v3.ZipkinConfig + 11, // 4: tracing.options.gloo.solo.io.ListenerTracingSettings.datadog_config:type_name -> solo.io.envoy.config.trace.v3.DatadogConfig + 12, // 5: tracing.options.gloo.solo.io.ListenerTracingSettings.open_telemetry_config:type_name -> solo.io.envoy.config.trace.v3.OpenTelemetryConfig + 13, // 6: tracing.options.gloo.solo.io.ListenerTracingSettings.open_census_config:type_name -> solo.io.envoy.config.trace.v3.OpenCensusConfig + 4, // 7: tracing.options.gloo.solo.io.ListenerTracingSettings.environment_variables_for_tags:type_name -> tracing.options.gloo.solo.io.TracingTagEnvironmentVariable + 5, // 8: tracing.options.gloo.solo.io.ListenerTracingSettings.literals_for_tags:type_name -> tracing.options.gloo.solo.io.TracingTagLiteral + 6, // 9: tracing.options.gloo.solo.io.ListenerTracingSettings.metadata_for_tags:type_name -> tracing.options.gloo.solo.io.TracingTagMetadata + 3, // 10: tracing.options.gloo.solo.io.RouteTracingSettings.trace_percentages:type_name -> tracing.options.gloo.solo.io.TracePercentages + 9, // 11: tracing.options.gloo.solo.io.RouteTracingSettings.propagate:type_name -> google.protobuf.BoolValue + 14, // 12: tracing.options.gloo.solo.io.TracePercentages.client_sample_percentage:type_name -> google.protobuf.FloatValue + 14, // 13: tracing.options.gloo.solo.io.TracePercentages.random_sample_percentage:type_name -> google.protobuf.FloatValue + 14, // 14: tracing.options.gloo.solo.io.TracePercentages.overall_sample_percentage:type_name -> google.protobuf.FloatValue + 8, // 15: tracing.options.gloo.solo.io.TracingTagEnvironmentVariable.tag:type_name -> google.protobuf.StringValue + 8, // 16: tracing.options.gloo.solo.io.TracingTagEnvironmentVariable.name:type_name -> google.protobuf.StringValue + 8, // 17: tracing.options.gloo.solo.io.TracingTagEnvironmentVariable.default_value:type_name -> google.protobuf.StringValue + 8, // 18: tracing.options.gloo.solo.io.TracingTagLiteral.tag:type_name -> google.protobuf.StringValue + 8, // 19: tracing.options.gloo.solo.io.TracingTagLiteral.value:type_name -> google.protobuf.StringValue + 0, // 20: tracing.options.gloo.solo.io.TracingTagMetadata.kind:type_name -> tracing.options.gloo.solo.io.TracingTagMetadata.Kind + 7, // 21: tracing.options.gloo.solo.io.TracingTagMetadata.value:type_name -> tracing.options.gloo.solo.io.TracingTagMetadata.MetadataValue + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_init() } @@ -736,6 +992,30 @@ func file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_ return nil } } + file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TracingTagMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TracingTagMetadata_MetadataValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_msgTypes[0].OneofWrappers = []interface{}{ (*ListenerTracingSettings_ZipkinConfig)(nil), @@ -748,13 +1028,14 @@ func file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, + NumEnums: 1, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, GoTypes: file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_goTypes, DependencyIndexes: file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_depIdxs, + EnumInfos: file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_enumTypes, MessageInfos: file_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto_msgTypes, }.Build() File_github_com_solo_io_solo_apis_api_gloo_gloo_v1_options_tracing_tracing_proto = out.File diff --git a/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.hash.go b/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.hash.go index 7efa8cd89..f18d9f0e6 100644 --- a/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.hash.go +++ b/pkg/api/gloo.solo.io/v1/options/tracing/tracing.pb.hash.go @@ -150,6 +150,35 @@ func (m *ListenerTracingSettings) Hash(hasher hash.Hash64) (uint64, error) { } + for _, v := range m.GetMetadataForTags() { + + if h, ok := interface{}(v).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(v, nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + } + + err = binary.Write(hasher, binary.LittleEndian, m.GetSpawnUpstreamSpan()) + if err != nil { + return 0, err + } + switch m.ProviderConfig.(type) { case *ListenerTracingSettings_ZipkinConfig: @@ -512,3 +541,80 @@ func (m *TracingTagLiteral) Hash(hasher hash.Hash64) (uint64, error) { return hasher.Sum64(), nil } + +// Hash function +func (m *TracingTagMetadata) Hash(hasher hash.Hash64) (uint64, error) { + if m == nil { + return 0, nil + } + if hasher == nil { + hasher = fnv.New64() + } + var err error + if _, err = hasher.Write([]byte("tracing.options.gloo.solo.io.github.com/solo-io/solo-apis/pkg/api/gloo.solo.io/v1/options/tracing.TracingTagMetadata")); err != nil { + return 0, err + } + + if _, err = hasher.Write([]byte(m.GetTag())); err != nil { + return 0, err + } + + err = binary.Write(hasher, binary.LittleEndian, m.GetKind()) + if err != nil { + return 0, err + } + + if h, ok := interface{}(m.GetValue()).(safe_hasher.SafeHasher); ok { + if _, err = hasher.Write([]byte("Value")); err != nil { + return 0, err + } + if _, err = h.Hash(hasher); err != nil { + return 0, err + } + } else { + if fieldValue, err := hashstructure.Hash(m.GetValue(), nil); err != nil { + return 0, err + } else { + if _, err = hasher.Write([]byte("Value")); err != nil { + return 0, err + } + if err := binary.Write(hasher, binary.LittleEndian, fieldValue); err != nil { + return 0, err + } + } + } + + if _, err = hasher.Write([]byte(m.GetDefaultValue())); err != nil { + return 0, err + } + + return hasher.Sum64(), nil +} + +// Hash function +func (m *TracingTagMetadata_MetadataValue) Hash(hasher hash.Hash64) (uint64, error) { + if m == nil { + return 0, nil + } + if hasher == nil { + hasher = fnv.New64() + } + var err error + if _, err = hasher.Write([]byte("tracing.options.gloo.solo.io.github.com/solo-io/solo-apis/pkg/api/gloo.solo.io/v1/options/tracing.TracingTagMetadata_MetadataValue")); err != nil { + return 0, err + } + + if _, err = hasher.Write([]byte(m.GetNamespace())); err != nil { + return 0, err + } + + if _, err = hasher.Write([]byte(m.GetKey())); err != nil { + return 0, err + } + + if _, err = hasher.Write([]byte(m.GetNestedFieldDelimiter())); err != nil { + return 0, err + } + + return hasher.Sum64(), nil +}