Closed arkadiuszSzast closed 3 years ago
Hi Arkadiusz @arkadiuszSzast
There is no way to achieve this with Middlewares because Middlewares don't know which Handlers will be handling the Notification. This is because a Notification Handler is just another Middleware that runs after all custom Middlewares (and all Middlewares are independent of each other).
If you want to know which Handlers have actually handled your Notification, you can achieve this by creating a base Handler class that performs logging, and then derive your concrete handlers from it.
Does that work for you?
Hi,
I'm trying to get Notification.Handler class name inside Notification.Middleware but I cannot find any way to achieve that. I need it inside my 'LoggableMiddleware' and 'TraceableMiddleware'. Just for logging that name and adding it as a span tag. Is there any option to do it?
And from middleware I want to log something like "Handling Ping notification in PongHandler "