File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export type {
1818} from '@sentry/types' ;
1919export type { AddRequestDataToEventOptions } from '@sentry/utils' ;
2020
21+ export type { TransactionNamingScheme } from './requestdata' ;
2122export type { NodeOptions } from './types' ;
2223
2324export {
Original file line number Diff line number Diff line change 33
44import { EventProcessor , Hub , Integration } from '@sentry/types' ;
55
6- import { addRequestDataToEvent , AddRequestDataToEventOptions , DEFAULT_USER_INCLUDES } from '../requestdata' ;
6+ import {
7+ addRequestDataToEvent ,
8+ AddRequestDataToEventOptions ,
9+ DEFAULT_USER_INCLUDES ,
10+ TransactionNamingScheme ,
11+ } from '../requestdata' ;
712
813type RequestDataOptions = {
914 /**
@@ -19,6 +24,9 @@ type RequestDataOptions = {
1924 user ?: boolean | Array < typeof DEFAULT_USER_INCLUDES [ number ] > ;
2025 } ;
2126
27+ /** Whether to identify transactions by parameterized path, parameterized path with method, or handler name */
28+ transactionNamingScheme : TransactionNamingScheme ;
29+
2230 /**
2331 * Function for adding request data to event. Defaults to `addRequestDataToEvent` from `@sentry/node` for now, but
2432 * left injectable so this integration can be moved to `@sentry/core` and used in browser-based SDKs in the future.
@@ -39,6 +47,7 @@ const DEFAULT_OPTIONS = {
3947 url : true ,
4048 user : DEFAULT_USER_INCLUDES ,
4149 } ,
50+ transactionNamingScheme : 'methodpath' ,
4251} ;
4352
4453/** Add data about a request to an event. Primarily for use in Node-based SDKs, but included in `@sentry/integrations`
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export interface AddRequestDataToEventOptions {
2525 } ;
2626}
2727
28- type TransactionNamingScheme = 'path' | 'methodPath' | 'handler' ;
28+ export type TransactionNamingScheme = 'path' | 'methodPath' | 'handler' ;
2929
3030/**
3131 * Sets parameterized route as transaction name e.g.: `GET /users/:id`
You can’t perform that action at this time.
0 commit comments