File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
packages/event-proxy-server Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,25 @@ import type { AddressInfo } from 'net';
7
7
import * as os from 'os' ;
8
8
import * as path from 'path' ;
9
9
10
+ interface EventProxyServerOptions {
11
+ /** Port to start the event proxy server at. */
12
+ port : number ;
13
+ /** The name for the proxy server used for referencing it with listener functions */
14
+ proxyServerName : string ;
15
+ }
16
+
10
17
interface SentryRequestCallbackData {
11
18
envelope : Envelope ;
12
19
rawProxyRequestBody : string ;
13
20
rawSentryResponseBody : string ;
14
21
sentryResponseStatusCode ?: number ;
15
22
}
16
23
17
- export async function startEventProxyServer ( options : { port : number ; proxyServerName : string } ) : Promise < void > {
24
+ /**
25
+ * Starts an event proxy server that will proxy events to sentry when the `tunnel` option is used. Point the `tunnel`
26
+ * option to this server (like this `tunnel: http://localhost:${port option}/`).
27
+ */
28
+ export async function startEventProxyServer ( options : EventProxyServerOptions ) : Promise < void > {
18
29
const eventCallbackListeners : Set < ( data : string ) => void > = new Set ( ) ;
19
30
20
31
const proxyServer = http . createServer ( ( proxyRequest , proxyResponse ) => {
Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : " ../../tsconfig.json" ,
3
3
"compilerOptions" : {
4
- "module" : " esnext " ,
4
+ "module" : " ES2015 " ,
5
5
"outDir" : " build"
6
6
},
7
7
"include" : [" src/**/*.ts" ]
You can’t perform that action at this time.
0 commit comments