-
Notifications
You must be signed in to change notification settings - Fork 100
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
[Feature]: otelfiber - propagate tracing context as headers in outbound response #848
[Feature]: otelfiber - propagate tracing context as headers in outbound response #848
Conversation
Hi, I wonder if we could add a test for that. |
@ledex is this possible? can you also update your branch with the latest master changes |
Alright, the tests are there. I noticed that the outbound propagation only takes effect if |
@emanuelef Can you check the pull-request again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but still wondering which common use case is addressing
@ledex can you explain the use case ? |
@emanuelef So my usecase is that I have one component ( But I've read the B3-specs just now and I'm not sure if that's the correct way to do it... But we do it here at our company like this. |
As I mentioned in the other thread I was able to pass the trace id with the current otelfiber: https://medium.com/stackademic/start-using-opentelemetry-with-go-fiber-1005697d841f. |
I tried again calling one secondary component using otelfiber: ![]() But I cannot comment on B3-specs, if there's the need to support that. |
@ledex what is your opinion on this, he (@emanuelef ) thinks it is already possible |
@emanuelef So I think we talk past each other. In your example the caller calls your service sequenceDiagram
autonumber
participant Caller
participant Service A
participant Service B
Caller ->>+ Service A: call service A
Note right of Service A: create tracing context (`foo`)
Note right of Service A: do something
Note right of Service A: write spans
Service A ->>+ Caller: return result and tracing context (`foo`)
Caller ->>+ Service B: call service B with tracing context (`foo`)
Note right of Service B: do something
Note right of Service B: write spans
Service B ->>+ Caller: return reault and tracing context (`foo`)
In call |
@ledex I think I would probably just create the context in the caller and then it will pass around the trace parent. PS: Nice chart and integration with GitHub |
Yes that's right, service A should be the initiator in my use-case. We are providing this our service to other applications within our company, so we cannot be certain who calls our service and weather or not they provide a tracing context. In any case we want to return the tracing-context back to the caller, so that they can see it in their logs and can access the corresponding trace. |
So you want to pass back the context from Service A with the new trace and keep using that from that first call on. |
@emanuelef @ledex any outcome ? should i merge these changes? |
@ReneWerner87 @emanuelef At the moment we have a work-around build for this in our code base, but I can see why you might not want this feature in otelfiber. I'm also not that familiar with the B3 specs and that's really up to you. I just thought it might be helpful for others and it does not really break anything, however, it is quite a specific usecase. |
…-in-outbound-response
If its not a breaking change, I'd say we merge it? |
This fixed #836.