I look at DuplicateContext, but i did not find it in implementation of HttpServer, i found only ContextInternal, but it is marker for only internal use.
I try use
DuplicateContext, but i don't know how to use it witch GRPC, i understand that i need duplicate context and then run code on that duplicated context, but don't know how to manage that on grpc interceptor where i get opentracing span from metadata and then pass them to DuplicatedContext and run method on that context.
Basically i need save solution to pass span from grpc header to grpc method, right know i have it like this.
In interceptor i do
```
val context: VertxContext = serverContext.vertx.getOrCreateContext()
context.put("span", span)
context.put("spanContext", span.context())
context.put("xgrid", xgrid)
```
and than on grpc method
```
val context: VertxContext = Vertx.currentContext()
val span: Span = context.get<Span>("span")
```
but i don't know if this is thread switch save solution, for testing i didn't see span mixing, but i am not sure about it as what i am aware vertx context is shared between requests on eventloop
Dne středa 27. ledna 2021 v 11:32:10 UTC+1 uživatel Petros napsal: