You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I need to intercept suspend methods and execute them within a custom coroutine context. I want to ensure that the method runs asynchronously with the custom context, while maintaining context propagation for OpenTelemetry (such as parent-child spans and tracing metadata).
I want something like this:
suspend fun intercept(originalMethod: Callable<*>, method: Method, args: Array<Any?>): Any? {
val customContext = Dispatchers.IO // Example of custom context
return withContext(customContext) {
// Call the original suspend method
originalMethod.call()
}
}
The text was updated successfully, but these errors were encountered:
I do not know how those get compiled, so the first thing you'd need to check would be to look into javap of a Kotlin class. From there, you can intercept the byte code as it is shown by javap.
Hi! I need to intercept suspend methods and execute them within a custom coroutine context. I want to ensure that the method runs asynchronously with the custom context, while maintaining context propagation for OpenTelemetry (such as parent-child spans and tracing metadata).
I want something like this:
The text was updated successfully, but these errors were encountered: