Skip to content

Commit

Permalink
fix(remix): Strip query params from transaction names (#5368)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiPrasad committed Jul 6, 2022
1 parent 1e3ba37 commit ba4a5e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/remix/src/utils/instrumentServer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { captureException, configureScope, getCurrentHub, startTransaction } from '@sentry/node';
import { getActiveTransaction } from '@sentry/tracing';
import { addExceptionMechanism, fill, loadModule, logger } from '@sentry/utils';
import { addExceptionMechanism, fill, loadModule, logger, stripUrlQueryAndFragment } from '@sentry/utils';

// Types vendored from @remix-run/server-runtime@1.6.0:
// https://github.com/remix-run/remix/blob/f3691d51027b93caa3fd2cdfe146d7b62a6eb8f2/packages/remix-server-runtime/server.ts
Expand Down Expand Up @@ -134,7 +134,7 @@ function wrapRequestHandler(origRequestHandler: RequestHandler): RequestHandler
return async function (this: unknown, request: Request, loadContext?: unknown): Promise<Response> {
const currentScope = getCurrentHub().getScope();
const transaction = startTransaction({
name: request.url,
name: stripUrlQueryAndFragment(request.url),
op: 'http.server',
tags: {
method: request.method,
Expand Down

0 comments on commit ba4a5e7

Please sign in to comment.