File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ async function start(): Promise<void> {
35
35
const address = await services . ServiceDiscovery . discoverInstance ( namespace , name ) ;
36
36
37
37
( services . Trace as any ) . setDaemonAddress ( address ) ;
38
+ ( services . Trace as any ) . captureHTTPRequests ( ) ;
38
39
}
39
40
40
41
server . listen ( config . port , ( ) => {
Original file line number Diff line number Diff line change @@ -5,9 +5,6 @@ import https from 'https';
5
5
class AWSXRay implements Services . Trace {
6
6
constructor ( plugins : string ) {
7
7
this . setPlugins ( plugins ) ;
8
-
9
- XRay . captureHTTPsGlobal ( http , true ) ;
10
- XRay . captureHTTPsGlobal ( https , true ) ;
11
8
}
12
9
13
10
public openSegment ( defaultName : string ) {
@@ -63,6 +60,11 @@ class AWSXRay implements Services.Trace {
63
60
64
61
XRay . config ( xrayPlugins ) ;
65
62
}
63
+
64
+ public captureHTTPRequests ( ) : void {
65
+ XRay . captureHTTPsGlobal ( http , true ) ;
66
+ XRay . captureHTTPsGlobal ( https , true ) ;
67
+ }
66
68
}
67
69
68
70
export default AWSXRay ;
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ async function start() {
76
76
const address = await services . ServiceDiscovery . discoverInstance ( namespace , name ) ;
77
77
78
78
( services . Trace as any ) . setDaemonAddress ( address ) ;
79
+ ( services . Trace as any ) . captureHTTPRequests ( ) ;
79
80
}
80
81
81
82
logger . info ( 'Upload worker is running' ) ;
You can’t perform that action at this time.
0 commit comments