UNPKG

1.96 kBTypeScriptView Raw
1import type { Client, Event, EventHint, Integration, IntegrationClass } from '@sentry/types';
2import type { TransactionNamingScheme } from '@sentry/utils';
3export type RequestDataIntegrationOptions = {
4 /**
5 * Controls what data is pulled from the request and added to the event
6 */
7 include?: {
8 cookies?: boolean;
9 data?: boolean;
10 headers?: boolean;
11 ip?: boolean;
12 query_string?: boolean;
13 url?: boolean;
14 user?: boolean | {
15 id?: boolean;
16 username?: boolean;
17 email?: boolean;
18 };
19 };
20 /** Whether to identify transactions by parameterized path, parameterized path with method, or handler name */
21 transactionNamingScheme?: TransactionNamingScheme;
22};
23export declare const requestDataIntegration: (options?: RequestDataIntegrationOptions | undefined) => import("@sentry/types").IntegrationFnResult;
24/**
25 * Add data about a request to an event. Primarily for use in Node-based SDKs, but included in `@sentry/integrations`
26 * so it can be used in cross-platform SDKs like `@sentry/nextjs`.
27 * @deprecated Use `requestDataIntegration()` instead.
28 */
29export declare const RequestData: IntegrationClass<Integration & {
30 processEvent: (event: Event, hint: EventHint, client: Client) => Event;
31}> & (new (options?: {
32 /**
33 * Controls what data is pulled from the request and added to the event
34 */
35 include?: {
36 cookies?: boolean;
37 data?: boolean;
38 headers?: boolean;
39 ip?: boolean;
40 query_string?: boolean;
41 url?: boolean;
42 user?: boolean | {
43 id?: boolean;
44 username?: boolean;
45 email?: boolean;
46 };
47 };
48 /** Whether to identify transactions by parameterized path, parameterized path with method, or handler name */
49 transactionNamingScheme?: TransactionNamingScheme;
50}) => Integration);
51//# sourceMappingURL=requestdata.d.ts.map
\No newline at end of file