contrib icon indicating copy to clipboard operation
contrib copied to clipboard

Opentelemetry - read baggage

Open itziklavon opened this issue 2 years ago • 6 comments

Hi, are there any changes needs to be done to read the telemetry baggage? so we would have full flow between services?

currently, if call comes to the server, from a different server which is also using opentelemetry, we cannot see this relation

thanks!

itziklavon avatar Dec 07 '22 09:12 itziklavon

Hi 👋

The middleware actually does context propagation: https://github.com/gofiber/contrib/blob/main/otelfiber/fiber.go#L100

Can you elaborate your issue? Do you have any further info to reproduce to see your requirement?

mstrYoda avatar Mar 28 '23 23:03 mstrYoda

In general, we have 2 applications both of them monitored via opentelemetry i have some calls between service A and service B

however, i don't see this full flow via the UI i mean i do see the calls, from service A -> B but service B parent trace is Null

might be issue with the way we configure the http client, but i'm not sure any other configuration needed? this is the way:

	httpClient.SetTimeout(10 * time.Second)
	httpClient.SetRetryCount(3)
	httpClient.SetTransport(otelhttp.NewTransport(new(RedirectChecker)))
	return httpClient


itziklavon avatar Mar 29 '23 06:03 itziklavon

Can you share screenshots?

It should be enough to add otel transport to your http client.

I can see in Jaeger that our applications propagates spans.

mstrYoda avatar Mar 31 '23 00:03 mstrYoda

Hi, sure for example:

Service A (gateway - Java based app): image

Service B (goadmission - go-fiber based app): image

it is not the same request(it is hard to find the exact request as i don't have anything to link them by), but all request to the path shows in service A going to service B, and it's parent context is null

service A on this case is java (using open telemetry agent)

other services, service A is nodejs and service B is java: image

in here i see the call from service A (prerouter) to service B (koala-monolith)

itziklavon avatar Mar 31 '23 04:03 itziklavon

Are you sure about every service's HTTP clients add open telemetry span in their requests?

mstrYoda avatar Mar 31 '23 10:03 mstrYoda

in this case i'm sure for example the gateway app from previous example image

different service, which uses java, does have the proper baggage

itziklavon avatar Apr 01 '23 07:04 itziklavon