Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

translator: set SpawnUpstreamSpan to true #3102

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

zirain
Copy link
Member

@zirain zirain commented Apr 6, 2024

According the doc, EG should set SpawnUpstreamSpan to true.

	//   - If Envoy is used as gateway or independent proxy, or users want to make the sidecar and its
	//     application as different hops in the trace chain, this flag should be set to true.

@zirain zirain requested a review from a team as a code owner April 6, 2024 08:10
Copy link

codecov bot commented Apr 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.52%. Comparing base (b859ec6) to head (947014b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3102      +/-   ##
==========================================
+ Coverage   66.50%   66.52%   +0.01%     
==========================================
  Files         161      161              
  Lines       22670    22671       +1     
==========================================
+ Hits        15077    15082       +5     
+ Misses       6720     6717       -3     
+ Partials      873      872       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zirain
Copy link
Member Author

zirain commented Apr 6, 2024

before:

ResourceSpans #0
Resource SchemaURL:
Resource attributes:
     -> service.name: Str(eg.default)
ScopeSpans #0
ScopeSpans SchemaURL:
InstrumentationScope
Span #0
    Trace ID       : 0c5b9e636f367d549dbce209fa185a1d
    Parent ID      :
    ID             : 918e2c1cfae55cbd
    Name           : ingress
    Kind           : Server
    Start time     : 2024-04-06 07:50:57.19917 +0000 UTC
    End time       : 2024-04-06 07:50:57.201607 +0000 UTC
    Status code    : Unset
    Status message :
Attributes:
     -> node_id: Str(envoy-default-eg-e41e7b31-9cb7b688f-gl5bw)
     -> zone: Str()
     -> guid:x-request-id: Str(3e50d5ec-116f-9312-8b67-bc74615ead39)
     -> http.url: Str(http://172.18.255.201/)
     -> http.method: Str(GET)
     -> downstream_cluster: Str(-)
     -> user_agent: Str(curl/8.4.0)
     -> http.protocol: Str(HTTP/1.1)
     -> peer.address: Str(172.18.0.1)
     -> request_size: Str(0)
     -> response_size: Str(589)
     -> component: Str(proxy)
     -> upstream_cluster: Str(httproute/default/weight-route/rule/0)
     -> upstream_cluster.name: Str(httproute/default/weight-route/rule/0)
     -> http.status_code: Str(200)
     -> response_flags: Str(-)
     -> k8s.pod.name: Str(envoy-default-eg-e41e7b31-9cb7b688f-gl5bw)
     -> k8s.namespace.name: Str(envoy-gateway-system)
     -> k8s.cluster.name: Str(envoy-gateway)
	{"kind": "exporter", "data_type": "traces", "name": "logging"}

after:

ResourceSpans #0
Resource SchemaURL:
Resource attributes:
     -> service.name: Str(eg.default)
ScopeSpans #0
ScopeSpans SchemaURL:
InstrumentationScope
Span #0
    Trace ID       : 09412aeacff6d9fff8f748f5ac3dd656
    Parent ID      : ae3ca6dd5a413c7f
    ID             : 03591b56247d2050
    Name           : router httproute/default/weight-route/rule/0 egress
    Kind           : Client
    Start time     : 2024-04-06 07:57:05.05549 +0000 UTC
    End time       : 2024-04-06 07:57:05.060862 +0000 UTC
    Status code    : Unset
    Status message :
Attributes:
     -> http.protocol: Str(HTTP/1.1)
     -> upstream_address: Str(10.244.0.46:3000)
     -> peer.address: Str(10.244.0.46:3000)
     -> component: Str(proxy)
     -> upstream_cluster: Str(httproute/default/weight-route/rule/0)
     -> upstream_cluster.name: Str(httproute/default/weight-route/rule/0)
     -> http.status_code: Str(200)
     -> response_flags: Str(-)
     -> k8s.pod.name: Str(envoy-default-eg-e41e7b31-6bdbd86fbd-s9ddz)
     -> k8s.namespace.name: Str(envoy-gateway-system)
     -> k8s.cluster.name: Str(envoy-gateway)
Span #1
    Trace ID       : 09412aeacff6d9fff8f748f5ac3dd656
    Parent ID      :
    ID             : ae3ca6dd5a413c7f
    Name           : ingress
    Kind           : Server
    Start time     : 2024-04-06 07:57:05.054548 +0000 UTC
    End time       : 2024-04-06 07:57:05.060945 +0000 UTC
    Status code    : Unset
    Status message :
Attributes:
     -> node_id: Str(envoy-default-eg-e41e7b31-6bdbd86fbd-s9ddz)
     -> zone: Str()
     -> guid:x-request-id: Str(58d054ec-9cad-9f20-9d36-ec7ce5b5b2f3)
     -> http.url: Str(http://172.18.255.201/)
     -> http.method: Str(GET)
     -> downstream_cluster: Str(-)
     -> user_agent: Str(curl/8.4.0)
     -> http.protocol: Str(HTTP/1.1)
     -> peer.address: Str(172.18.0.1)
     -> request_size: Str(0)
     -> response_size: Str(589)
     -> component: Str(proxy)
     -> upstream_cluster: Str(httproute/default/weight-route/rule/0)
     -> upstream_cluster.name: Str(httproute/default/weight-route/rule/0)
     -> http.status_code: Str(200)
     -> response_flags: Str(-)
     -> k8s.pod.name: Str(envoy-default-eg-e41e7b31-6bdbd86fbd-s9ddz)
     -> k8s.namespace.name: Str(envoy-gateway-system)
     -> k8s.cluster.name: Str(envoy-gateway)
	{"kind": "exporter", "data_type": "traces", "name": "logging"}

@zirain zirain force-pushed the SpawnUpstreamSpan branch from 03f02eb to 128b91e Compare April 6, 2024 08:16
@zirain
Copy link
Member Author

zirain commented Apr 6, 2024

/retest

Signed-off-by: zirain <[email protected]>
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! lets cherry pick this in to v1.0

@arkodg arkodg merged commit 635ebfc into envoyproxy:main Apr 8, 2024
19 checks passed
@zirain zirain deleted the SpawnUpstreamSpan branch April 8, 2024 04:50
arkodg pushed a commit to arkodg/gateway that referenced this pull request Apr 8, 2024
* translator: set SpawnUpstreamSpan to true

Signed-off-by: zirain <[email protected]>

* update

Signed-off-by: zirain <[email protected]>

---------

Signed-off-by: zirain <[email protected]>
(cherry picked from commit 635ebfc)
Signed-off-by: Arko Dasgupta <[email protected]>
Xunzhuo added a commit that referenced this pull request Apr 8, 2024
* Run certgen when upgrading (#2934)

run certgen when upgrading

Signed-off-by: huabing zhao <[email protected]>
(cherry picked from commit 62ecf15)
Signed-off-by: Arko Dasgupta <[email protected]>

* Fix: nil secret in resourceversiontable (#2982)

* fix nil secret in resourceversiontable

Signed-off-by: huabing zhao <[email protected]>

* check secrets in the xds result

Signed-off-by: huabing zhao <[email protected]>

---------

Signed-off-by: huabing zhao <[email protected]>
(cherry picked from commit e880439)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: add missing http filters to the http filter chain (#2970)

* fix: add missing http filters to the http filter chain

Signed-off-by: huabing zhao <[email protected]>

* refactor

Signed-off-by: huabing zhao <[email protected]>

* fix lint

Signed-off-by: huabing zhao <[email protected]>

* add comments

Signed-off-by: huabing zhao <[email protected]>

* remove refactor

Signed-off-by: huabing zhao <[email protected]>

* remove refactor

Signed-off-by: huabing zhao <[email protected]>

* fix gen

Signed-off-by: huabing zhao <[email protected]>

* fix lint

Signed-off-by: Huabing Zhao <[email protected]>

---------

Signed-off-by: huabing zhao <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
(cherry picked from commit f699edf)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: allow websockets in url rewrite (#3022)

allow websockets in url rewrite

Signed-off-by: Jesse Haka <[email protected]>
Co-authored-by: zirain <[email protected]>
(cherry picked from commit 3d51933)
Signed-off-by: Arko Dasgupta <[email protected]>

* Set host for http health checker explicitly to avoid using the cluster name as host header for http health checking request. (#3057)

* Set host for http health checker explictly to avoid using the cluster name as host header for http health checking request

Signed-off-by: lemonlinger <[email protected]>

* fix broken tests

Signed-off-by: lemonlinger <[email protected]>

* fix health-check test case in xds translation

Signed-off-by: lemonlinger <[email protected]>

* Simplify code and concise comments

Signed-off-by: lemonlinger <[email protected]>

---------

Signed-off-by: lemonlinger <[email protected]>
(cherry picked from commit 8f450a9)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: do not create infra resources when missing translated listeners (#3043)

* fix: do not create infra resources when missing translated listeners

Signed-off-by: Karol Szwaj <[email protected]>

* remove empty line

Signed-off-by: Karol Szwaj <[email protected]>

* skip infra creation on empty listeners and log it

Signed-off-by: Karol Szwaj <[email protected]>

---------

Signed-off-by: Karol Szwaj <[email protected]>
(cherry picked from commit 36d7141)
Signed-off-by: Arko Dasgupta <[email protected]>

* Fix: double slashes in redirect URL (#2998)

* fix: double trailing splashs in redirect URL

Signed-off-by: huabing zhao <[email protected]>

* add e2e tests

Signed-off-by: huabing zhao <[email protected]>

* fix lint

Signed-off-by: huabing zhao <[email protected]>

* fix test

Signed-off-by: huabing zhao <[email protected]>

* fix test

Signed-off-by: huabing zhao <[email protected]>

* fix test

Signed-off-by: huabing zhao <[email protected]>

* fix test

Signed-off-by: huabing zhao <[email protected]>

* add e2e tests

Signed-off-by: huabing zhao <[email protected]>

* fix test

Signed-off-by: huabing zhao <[email protected]>

* revert

Signed-off-by: huabing zhao <[email protected]>

* use regex rewrite to generate the redirect url

Signed-off-by: huabing zhao <[email protected]>

* use regex rewrite to generate the redirect url

Signed-off-by: huabing zhao <[email protected]>

* use regex rewrite to generate the redirect url

Signed-off-by: huabing zhao <[email protected]>

* remove comments

Signed-off-by: huabing zhao <[email protected]>

* extract method

Signed-off-by: huabing zhao <[email protected]>

* address comments

Signed-off-by: huabing zhao <[email protected]>

---------

Signed-off-by: huabing zhao <[email protected]>
(cherry picked from commit ceb697f)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: Allow Policy to attach to multiple http listeners  (#2967)

* Fixing the clienttrafficpolicy validation.

Signed-off-by: Lior Okman <[email protected]>

* Make SecurityPolicy validate correctly.

Signed-off-by: Lior Okman <[email protected]>

* Reverted the SecurityPolicy validation - handled differently via
another feature.

Signed-off-by: Lior Okman <[email protected]>

* Updated the tests to reflect that this validation isn't required for SecurityPolicy

Signed-off-by: Lior Okman <[email protected]>

* Added some comments to explain the validation being performed.

Signed-off-by: Lior Okman <[email protected]>

* Updated the error message as requested in the review.

Signed-off-by: Lior Okman <[email protected]>

---------

Signed-off-by: Lior Okman <[email protected]>
(cherry picked from commit f9409e4)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: set path prefix for http ext auth service (#3018)

Signed-off-by: huabing zhao <[email protected]>
(cherry picked from commit 2882b7c)
Signed-off-by: Arko Dasgupta <[email protected]>

* Change route sorting order to Exact > RegularExpression > PathPrefix (#2579)

* Change route sorting order to Exact > RegularExpression > PathPrefix

kubernetes-sigs/gateway-api#1770
kubernetes-sigs/gateway-api#1855

Signed-off-by: Stéphane Cottin <[email protected]>
(cherry picked from commit 11f56fd)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: infraIR duplicate port translation for merged gateways (#3061)

* fix: duplicate port translation for merged gateways

Signed-off-by: Karol Szwaj <[email protected]>

* refactor to map

Signed-off-by: Karol Szwaj <[email protected]>

* rename map

Signed-off-by: Karol Szwaj <[email protected]>

* add seperate testcase

Signed-off-by: Karol Szwaj <[email protected]>

---------

Signed-off-by: Karol Szwaj <[email protected]>
(cherry picked from commit 29946b0)
Signed-off-by: Arko Dasgupta <[email protected]>

* translator: set SpawnUpstreamSpan to true (#3102)

* translator: set SpawnUpstreamSpan to true

Signed-off-by: zirain <[email protected]>

* update

Signed-off-by: zirain <[email protected]>

---------

Signed-off-by: zirain <[email protected]>
(cherry picked from commit 635ebfc)
Signed-off-by: Arko Dasgupta <[email protected]>

* fix: rate limit doesn't work with two(and more) listeners (#3085)

* fix: rate limit doesn't work with two listeners

Signed-off-by: huabing zhao <[email protected]>

* add e2e test for rate limit on multiple listeners

Signed-off-by: huabing zhao <[email protected]>

* address comments

Signed-off-by: huabing zhao <[email protected]>

---------

Signed-off-by: huabing zhao <[email protected]>
Co-authored-by: Xunzhuo <[email protected]>
(cherry picked from commit a5bedbc)
Signed-off-by: Arko Dasgupta <[email protected]>

* rerun make testdata

Signed-off-by: Arko Dasgupta <[email protected]>

---------

Signed-off-by: huabing zhao <[email protected]>
Signed-off-by: Arko Dasgupta <[email protected]>
Signed-off-by: Huabing Zhao <[email protected]>
Signed-off-by: Jesse Haka <[email protected]>
Signed-off-by: lemonlinger <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Lior Okman <[email protected]>
Signed-off-by: Stéphane Cottin <[email protected]>
Signed-off-by: zirain <[email protected]>
Co-authored-by: Huabing Zhao <[email protected]>
Co-authored-by: Jesse Haka <[email protected]>
Co-authored-by: zirain <[email protected]>
Co-authored-by: Meng <[email protected]>
Co-authored-by: Karol Szwaj <[email protected]>
Co-authored-by: Lior Okman <[email protected]>
Co-authored-by: vixns <[email protected]>
Co-authored-by: Xunzhuo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants