getsentry / getsentry/sentry-javascript

Automatically exclude tunnel request from backend transactions

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

描述

### Problem Statement

When setting up the `tunnel` option, users will often follow [the docs](https://docs.sentry.io/platforms/javascript/troubleshooting/#using-the-tunnel-option) and add a local API route to forward those envelopes.

These POST requests will usually get auto-instrumented on the backend and will potentially result in a transaction for every frontend envelope.

### Solution Brainstorm

Filter these out in some way?

If the `tunnel` option is set in the frontend, we could automatically set the `Content-Type` as `application/x-sentry-envelope`. This can be picked up in the http instrumentation and used to ignore these requests.

- Adding the `Content-Type` header will also fix a Svelte issue #16112

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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