getsentry / getsentry/sentry-javascript

[Nestjs] Instrument Controllers

未关闭
#18,485 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Improvement Nest.js
主要语言
TypeScript
星标
8.7k
派生
1.8k
平均合并
1 天 17 小时
30 天内合并 PR
515

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。