Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support HTTP Request Body extraction #1334

Closed
1 task done
bruno-garcia opened this issue Mar 18, 2021 · 1 comment · Fixed by #1595
Closed
1 task done

Support HTTP Request Body extraction #1334

bruno-garcia opened this issue Mar 18, 2021 · 1 comment · Fixed by #1595

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Mar 18, 2021

This feature exists in other SDKs and is configured like this:

An option named maxRequestBodySize.

The values are:

  • never: request bodies are never sent (default)
  • small: only small request bodies will be captured where the cutoff for small depends on the SDK (typically 4KB)
  • medium: medium and small requests will be captured (typically 10KB)
  • always: the SDK will always capture the request body for as long as Sentry can make sense of it

If opting-in means the request stream need to be buffered, that should be transparent. Docs can mention this caveat but it's fair to assume that if you're looking to get the request body included in error
s, you're not running a server that's about to tip over and you can afford having the payload buffered.

The code can depend on a simple HTTP abstraction to get the data.. That was needed in .NET to support both ASP.NET and ASP.NET Core.
Also: 1, 2

This feature was requested in #331 particularly for application/json.

@marandaneto
Copy link
Contributor

Dart is also adding MaxRequestBodySize, so u may have a look at it too https://github.com/getsentry/sentry-dart/pull/473/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants