Closed domdorn closed 3 months ago
Hi @domdorn , I'm currently ooo and unable to look closely into the issue. I'll be able to look further in about 3-4 weeks. In the meantime one way to accomplish it is to use the method withMetadataZIO to pass metadata on each call. Possibly you can use zio functions to wrap the service in a way that extracts data from the environment
The short answer is that when constructing the client you need to have the dependency (CorrelationId
) resolved. This can be accomplished by pulling the CorrelationId
out of the environment the line before corr <- ZIO.service[CorrelationId]
, so you don't need that in the inner for-loop. Hope this helps. Take a look at the code here: https://github.com/scalapb/zio-grpc/blob/f4725c431969afe7b0ce99d9a12acda858397e68/examples/helloworld/src/main/scala/zio_grpc/examples/helloworld/HelloWorldClientMetadata.scala#L55-L56 - and if more specific help is needed feel free to provide a minimal reproducible example of what you are trying to do that used to previously work.
Hi!
I'm trying to upgrade vom
0.6.0-test8
to0.6.1
.In
0.6.0-test8
I was able to provide aZIO[R, Nothing, SafeMetadata]
to the scoped client which allows me to pass in context specific correlationIds for every request in this way:In
0.6.1
theR
ofscoped
(in this caseCorrelationId
) is removed. How can I now specify theCorrelationId
on a per-request basis?