Hi, I had the next scenario, some client calls a s...
# ktor
m
Hi, I had the next scenario, some client calls a service A with header H, service A needs to call service B propagating the same header H. Is there any feature, or plug-in, or something to do this without moving around this information all over the A service? I’m using ktor client and server in each service
a
What do you mean by moving around this information all over the A service? Could you just call a service B in the first place?
m
I mean that the request is handled in a class (e.g. SomethingHandler) that delegates to some action, that depends on some gateway and that gateway calls the service B. I don’t want to add the headers through all this layers
m
You might find ideas in https://github.com/mjstrasser/ktor-features-zipkin I wrote it a while ago to investigate how tracing might be implemented in Ktor. (It does not actually emit trace information to Prometheus or anything so it is incomplete.) But you could use the technique to attach headers into
ApplicationCall
and use them in clients.
👏 1
👀 1
m
Great, thank you!