Hey everyone, cross posting this from #ktor: has anyone tried using Koin with Ktor, and creating a scope that lasts for the duration of a request? For example, if I wanted to be able to inject something like a trace id, how would I go about doing that? Thanks!
g
Giorgos Neokleous
08/10/2020, 1:42 PM
I am not proficient with #koin or #ktor, however it should be just installing a koin module when you have the traceId and then uninstalling the module when the request is done 🤔
a
arnaud.giuliani
08/11/2020, 7:32 AM
@gps did you tried with Scope API?
g
gps
11/16/2020, 7:59 AM
@arnaud.giuliani (sorry, I missed this thread reply earlier). I'm not entirely sure how to do that. I understand that I would need to create a scope per request, but I'm not sure how I would go about tying that into the Ktor lifecycle