File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,9 @@ XRAY_RECORDER = {
315
315
...
316
316
}
317
317
```
318
+ If ` AUTO_PATCH_PARENT_SEGMENT_NAME ` is also specified, then a segment parent will be created
319
+ with the supplied name, wrapping the automatic patching so that it captures any dangling
320
+ subsegments created on the import patching.
318
321
319
322
### Add Flask middleware
320
323
Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ def ready(self):
39
39
)
40
40
41
41
if settings .PATCH_MODULES :
42
- with xray_recorder .in_segment ('startup' ):
42
+ if settings .AUTO_PATCH_PARENT_SEGMENT_NAME is not None :
43
+ with xray_recorder .in_segment (settings .AUTO_PATCH_PARENT_SEGMENT_NAME ):
44
+ patch (settings .PATCH_MODULES , ignore_module_patterns = settings .IGNORE_MODULE_PATTERNS )
45
+ else :
43
46
patch (settings .PATCH_MODULES , ignore_module_patterns = settings .IGNORE_MODULE_PATTERNS )
44
47
45
48
# if turned on subsegment will be generated on
Original file line number Diff line number Diff line change 15
15
'STREAMING_THRESHOLD' : None ,
16
16
'MAX_TRACE_BACK' : None ,
17
17
'PATCH_MODULES' : [],
18
+ 'AUTO_PATCH_PARENT_SEGMENT_NAME' : None ,
18
19
'IGNORE_MODULE_PATTERNS' : [],
19
20
}
20
21
You can’t perform that action at this time.
0 commit comments