nest-raven icon indicating copy to clipboard operation
nest-raven copied to clipboard

Use handler decorators to define Raven tags?

Open eropple opened this issue 5 years ago • 1 comments

Hey, me again. Haven't yet gotten around to the last two issues but wanted to drop this in before I forget.

I'm a really big fan of avoiding @UseInterceptors. It requires users to remember to add them. On the other hand, by using APP_INTERCEPTOR you're limited to the configuration values applied at interceptor creation, at a global level.

Maybe instead we can leverage decorators? I like namespacing my decorators with the package, so maybe something like @Raven.Tags(['foo', 'bar']) would be a good way to add tags to a scope on entry into the handler?

I've never used websockets in anger in NestJS, so I'm not sure if there's a good way to do similar there.

Any thoughts?

eropple avatar Oct 15 '19 03:10 eropple

Hm, that's a good idea. I was thinking about that. This should definitely be implemented. It could even be done as another module, providing just decorator functionality. As it isn't nest specific.

mentos1386 avatar Nov 13 '19 10:11 mentos1386