Skip to content

Commit

Permalink
chore(kuma-cp): stop using deprecated StartChildSpan (#9045)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beaumont <[email protected]>
  • Loading branch information
michaelbeaumont authored Jan 26, 2024
1 parent bda3bc4 commit f0be390
Show file tree
Hide file tree
Showing 101 changed files with 60 additions and 153 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ filterChains:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ filterChains:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ resources:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down Expand Up @@ -96,7 +95,6 @@ resources:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ resources:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down Expand Up @@ -96,7 +95,6 @@ resources:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down Expand Up @@ -155,7 +153,6 @@ resources:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ resources:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ resources:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ resources:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ filterChains:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ filterChains:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ filterChains:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ filterChains:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ filterChains:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
8 changes: 8 additions & 0 deletions pkg/plugins/policies/meshtrace/plugin/v1alpha1/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ var _ = Describe("MeshTrace", func() {
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
statPrefix: "127_0_0_1_17777"
tracing:
spawnUpstreamSpan: false
clientSampling:
value: 20
customTags:
Expand Down Expand Up @@ -179,6 +180,7 @@ var _ = Describe("MeshTrace", func() {
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
statPrefix: "127_0_0_1_27777"
tracing:
spawnUpstreamSpan: false
clientSampling:
value: 20
customTags:
Expand Down Expand Up @@ -272,6 +274,7 @@ var _ = Describe("MeshTrace", func() {
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
statPrefix: "127_0_0_1_17777"
tracing:
spawnUpstreamSpan: false
clientSampling:
value: 20
customTags:
Expand Down Expand Up @@ -314,6 +317,7 @@ var _ = Describe("MeshTrace", func() {
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
statPrefix: "127_0_0_1_27777"
tracing:
spawnUpstreamSpan: false
clientSampling:
value: 20
customTags:
Expand Down Expand Up @@ -405,6 +409,7 @@ var _ = Describe("MeshTrace", func() {
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
statPrefix: "127_0_0_1_17777"
tracing:
spawnUpstreamSpan: false
provider:
name: envoy.tracers.datadog
typedConfig:
Expand All @@ -430,6 +435,7 @@ var _ = Describe("MeshTrace", func() {
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
statPrefix: "127_0_0_1_27777"
tracing:
spawnUpstreamSpan: false
provider:
name: envoy.tracers.datadog
typedConfig:
Expand Down Expand Up @@ -496,6 +502,7 @@ var _ = Describe("MeshTrace", func() {
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
statPrefix: "127_0_0_1_17777"
tracing:
spawnUpstreamSpan: false
provider:
name: envoy.tracers.zipkin
typedConfig:
Expand Down Expand Up @@ -524,6 +531,7 @@ var _ = Describe("MeshTrace", func() {
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
statPrefix: "127_0_0_1_27777"
tracing:
spawnUpstreamSpan: false
provider:
name: envoy.tracers.zipkin
typedConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ filterChains:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand All @@ -58,6 +57,7 @@ filterChains:
sharedSpanContext: true
splitSpansForRequest: true
traceId128bit: true
spawnUpstreamSpan: true
useRemoteAddress: true
listenerFilters:
- name: envoy.filters.listener.tls_inspector
Expand Down
4 changes: 3 additions & 1 deletion pkg/plugins/policies/meshtrace/plugin/xds/configurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ func (c *Configurer) Configure(filterChain *envoy_listener.FilterChain) error {
}

return v3.UpdateHTTPConnectionManager(filterChain, func(hcm *envoy_hcm.HttpConnectionManager) error {
hcm.Tracing = &envoy_hcm.HttpConnectionManager_Tracing{}
hcm.Tracing = &envoy_hcm.HttpConnectionManager_Tracing{
SpawnUpstreamSpan: wrapperspb.Bool(c.IsGateway),
}

if c.Conf.Sampling != nil {
if overall := c.Conf.Sampling.Overall; overall != nil {
Expand Down
10 changes: 7 additions & 3 deletions pkg/plugins/runtime/gateway/filter_chain_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,13 @@ func newHTTPFilterChain(ctx xds_context.MeshContext, info GatewayListenerInfo) *
// is a no-op unless we later add a per-route configuration.
envoy_listeners.RateLimit([]*core_mesh.RateLimitResource{nil}),
envoy_listeners.DefaultCompressorFilter(),
envoy_listeners.Tracing(ctx.GetTracingBackend(info.Proxy.Policies.TrafficTrace), service, envoy_common.TrafficDirectionUnspecified, ""),
envoy_listeners.Tracing(
ctx.GetTracingBackend(info.Proxy.Policies.TrafficTrace),
service,
envoy_common.TrafficDirectionUnspecified,
"",
true,
),
// In mesh proxies, the access log is configured on the outbound
// listener, which is why we index the Logs slice by destination
// service name. A Gateway listener by definition forwards traffic
Expand All @@ -237,8 +243,6 @@ func newHTTPFilterChain(ctx xds_context.MeshContext, info GatewayListenerInfo) *
),
)

builder.AddConfigurer(&envoy_listeners_v3.HTTPRouterStartChildSpanRouter{})

// TODO(jpeach) if proxy protocol is enabled, add the proxy protocol listener filter.

return builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
2 changes: 0 additions & 2 deletions pkg/plugins/runtime/gateway/testdata/02-gateway-listener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down Expand Up @@ -97,7 +96,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand All @@ -79,6 +78,7 @@ Listeners:
collectorEndpoint: /api/v2/spans
collectorEndpointVersion: HTTP_JSON
collectorHostname: jaeger-collector.kuma-tracing:9411
spawnUpstreamSpan: true
useRemoteAddress: true
listenerFilters:
- name: envoy.filters.listener.tls_inspector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
4 changes: 0 additions & 4 deletions pkg/plugins/runtime/gateway/testdata/05-gateway-listener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down Expand Up @@ -107,7 +106,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down Expand Up @@ -170,7 +168,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down Expand Up @@ -231,7 +228,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ Listeners:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
startChildSpan: true
mergeSlashes: true
normalizePath: true
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT
Expand Down
Loading

0 comments on commit f0be390

Please sign in to comment.