Skip to content

GET /trpc/:path for every tRPC procedureΒ #15407

@divmgl

Description

@divmgl

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

8.54.0

Framework Version

@trpc/[email protected]

Link to Sentry event

https://permitflow.sentry.io/traces/?project=4504595707396096&statsPeriod=1h

Reproduction Example/SDK Setup

Image

Steps to Reproduce

import * as Sentry from "@sentry/node"
import { nodeProfilingIntegration } from "@sentry/profiling-node"

const isProduction = process.env.NODE_ENV === "production"
const dsn = process.env.SENTRY_DSN

Sentry.init({
  environment: isProduction ? "prod" : "dev",
  enabled: isProduction,
  debug: false,
  dsn: dsn,
  integrations: [nodeProfilingIntegration(), Sentry.prismaIntegration()],
  tracesSampleRate: 0.01,
  profilesSampleRate: 1.0, // This is relative to tracesSampleRate
  ignoreErrors: [
    "User does not have permission",
    "User is not a member of this workspace",
    /BAD_REQUEST|TOO_MANY_REQUESTS|UNAUTHORIZED|FORBIDDEN|NOT_FOUND/,
  ],
  // https://github.com/getsentry/sentry-javascript/issues/14846#issuecomment-2619573310
  registerEsmLoaderHooks: {
    onlyIncludeInstrumentedModules: true,
  },
})

Add to a Fastify/tRPC instance.

Expected Result

We can see the procedure names.

Actual Result

GET /trpc/:path

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions