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

add uber-trace-id for request header #110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aslongyouloveme
Copy link

so microservice can get this for inherit span

@pavolloffay
Copy link
Collaborator

@aslongyouloveme could you please help me understand this change and describe why it is needed?

The request already contains span context. This span context was used as a parent to span created in the subscribe method.

@aslongyouloveme
Copy link
Author

I used springcloud-gateway as the gateway, and downstream order-to-service is a micro service, gateway is a webflux application, and order-to-service is a servlet application. When I integrated jaeger, order-to-service could not get spancontext of gateway, because header (ude-trace-id) was not added in the forwarded request header. @

@aslongyouloveme
Copy link
Author

@pavolloffay

@pavolloffay
Copy link
Collaborator

It sounds fine, thanks for the explanation. Could you write a test for the functionality you are adding?

@aslongyouloveme
Copy link
Author

I would like to write a test case for it, I did not find any specimen test case for ‘TracingOperator.java’.
It seams difficult to mock ServerWebExchange that has so much method,
e.g this.exchange.mutate().request(req).build(), req.mutate().header(key, map.get(key))
Could you please give me some help?

@pavolloffay
Copy link
Collaborator

I am more interested in integration test. There are some for webflux which should use this class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants