1 | import type { BaseTransportOptions, Envelope, EnvelopeItemType, Event, Transport } from '@sentry/types';
|
2 | interface MatchParam {
|
3 | /** The envelope to be sent */
|
4 | envelope: Envelope;
|
5 | /**
|
6 | * A function that returns an event from the envelope if one exists. You can optionally pass an array of envelope item
|
7 | * types to filter by - only envelopes matching the given types will be multiplexed.
|
8 | * Allowed values are: 'event', 'transaction', 'profile', 'replay_event'
|
9 | *
|
10 | * @param types Defaults to ['event']
|
11 | */
|
12 | getEvent(types?: EnvelopeItemType[]): Event | undefined;
|
13 | }
|
14 | type RouteTo = {
|
15 | dsn: string;
|
16 | release: string;
|
17 | };
|
18 | type Matcher = (param: MatchParam) => (string | RouteTo)[];
|
19 | /**
|
20 | * Gets an event from an envelope.
|
21 | *
|
22 | * This is only exported for use in the tests
|
23 | */
|
24 | export declare function eventFromEnvelope(env: Envelope, types: EnvelopeItemType[]): Event | undefined;
|
25 | /**
|
26 | * Creates a transport that can send events to different DSNs depending on the envelope contents.
|
27 | */
|
28 | export declare function makeMultiplexedTransport<TO extends BaseTransportOptions>(createTransport: (options: TO) => Transport, matcher: Matcher): (options: TO) => Transport;
|
29 | export {};
|
30 | //# sourceMappingURL=multiplexed.d.ts.map |
\ | No newline at end of file |