File tree Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Expand file tree Collapse file tree 2 files changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,10 @@ use std::{
13
13
time:: Duration ,
14
14
} ;
15
15
16
- use :: metrics:: Timer ;
16
+ use :: metrics:: {
17
+ IntoLabel ,
18
+ Timer ,
19
+ } ;
17
20
use async_trait:: async_trait;
18
21
use common:: {
19
22
auth:: AuthConfig ,
@@ -1417,7 +1420,7 @@ pub trait IsolateWorker<RT: Runtime>: Clone + Send + 'static {
1417
1420
return ;
1418
1421
} ;
1419
1422
let reused = last_client_id. is_some( ) ;
1420
- // If we receive a request from a different client (i.e. a different backend ),
1423
+ // If we receive a request from a different client (i.e. a different instance ),
1421
1424
// recreate the isolate. We don't allow an isolate to be reused
1422
1425
// across clients for security isolation.
1423
1426
if last_client_id. get_or_insert_with( || {
@@ -1442,6 +1445,7 @@ pub trait IsolateWorker<RT: Runtime>: Clone + Send + 'static {
1442
1445
func_path!( ) ,
1443
1446
req. parent_trace. clone( ) ,
1444
1447
) ;
1448
+ root. add_property( || ( "reused_isolate" , reused. as_label( ) ) ) ;
1445
1449
// Require the layer below to opt into isolate reuse by setting `isolate_clean`.
1446
1450
let mut isolate_clean = false ;
1447
1451
let debug_str = self
Original file line number Diff line number Diff line change @@ -627,17 +627,19 @@ pub fn log_isolate_out_of_memory() {
627
627
}
628
628
629
629
pub fn record_component_function_path ( component_function_path : & ResolvedComponentFunctionPath ) {
630
- let mut labels = vec ! [ (
631
- Cow :: Borrowed ( "udf_path" ) ,
632
- Cow :: Owned ( component_function_path. udf_path. to_string( ) ) ,
633
- ) ] ;
634
- if let Some ( component_path) = & component_function_path. component_path {
635
- labels. push ( (
636
- Cow :: Borrowed ( "component" ) ,
637
- Cow :: Owned ( component_path. to_string ( ) ) ,
638
- ) ) ;
639
- }
640
- LocalSpan :: add_event ( Event :: new ( "component_function_path" ) . with_properties ( || labels) ) ;
630
+ LocalSpan :: add_event ( Event :: new ( "component_function_path" ) . with_properties ( || {
631
+ let mut labels = vec ! [ (
632
+ Cow :: Borrowed ( "udf_path" ) ,
633
+ Cow :: Owned ( component_function_path. udf_path. to_string( ) ) ,
634
+ ) ] ;
635
+ if let Some ( component_path) = & component_function_path. component_path {
636
+ labels. push ( (
637
+ Cow :: Borrowed ( "component" ) ,
638
+ Cow :: Owned ( component_path. to_string ( ) ) ,
639
+ ) ) ;
640
+ }
641
+ labels
642
+ } ) ) ;
641
643
}
642
644
643
645
register_convex_counter ! (
You can’t perform that action at this time.
0 commit comments