Skip to content

[fastify 4] Request body is not captured with fastify integration #16090

Closed
@tdournet

Description

@tdournet

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

9.11.0

Framework Version

fastify 4.28.0

Link to Sentry event

No response

Reproduction Example/SDK Setup

    Sentry.init({
      dsn: ...,
      tracesSampleRate: 0.1,
      release: process.env.RELEASE_NAME,
    });

    [...]

    this.fastifyServer = fastify();
    Sentry.setupFastifyErrorHandler(this.fastifyServer);

Steps to Reproduce

I installed sentry with fastify 4, following the documentation :

    Sentry.init({
      dsn: ...,
      tracesSampleRate: 0.1,
      release: process.env.RELEASE_NAME,
    });

    [...]

    this.fastifyServer = fastify();
    Sentry.setupFastifyErrorHandler(this.fastifyServer);

In every one of my sentry issues, I do not have a "body block" telling me the body payload of the incoming HTTP request. I have the request URL, the request headers, but no body payload.

Expected Result

Having the body payload in my issues in the incoming http requests informations, along with headers , and url (of couse, I tested for POST, PUT... in which I know I have a body with data in it)

Actual Result

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions