getsentry / getsentry/sentry-javascript

[Nestjs] Instrument Controllers

Aperta
#18,485 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Improvement Nest.js
Lingua principale
TypeScript
Stelle
8.7k
Fork
1.8k
Merge medio
1g 17h
PR unite (30g)
515

Descrizione

I noticed that we do not have any tracing for nest [controllers](https://docs.nestjs.com/controllers) atm. I'd assume that many people use nest as a REST service, in which case controllers are the entry points for any incoming requests.

Solution Brainstorm:

* All controllers have a `@Controller` decorator. Individual endpoints also have annotations for the request type (e.g. `@Get`).
* We can hook into one of these annotations as we for instance already do for the `@Injectable` decorator.
* We need to check if all annotations are actually required or if users can omit them (for instance if we omit the request type annotation it might default to a GET endpoint).

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.