getsentry / getsentry/sentry-javascript

[Nestjs] Instrument Controllers

Open
#18,485 2 comments 0 reactions 0 assignees View on GitHub
Improvement Nest.js
Dominant language
TypeScript
Stars
8.7k
Forks
1.8k
Avg merge
1d 17h
Merged PRs (30d)
515

Description

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).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.