@@ -21,6 +21,7 @@ impl BackendProcess {
2121 dtype : String ,
2222 uds_path : & str ,
2323 otlp_endpoint : Option < String > ,
24+ otlp_service_name : String ,
2425 ) -> Result < Self , BackendError > {
2526 // Get UDS path
2627 let uds = Path :: new ( uds_path) ;
@@ -33,21 +34,24 @@ impl BackendProcess {
3334 // Process args
3435 let mut python_server_args = vec ! [
3536 model_path,
36- "--dtype" . to_string ( ) ,
37+ "--dtype" . to_owned ( ) ,
3738 dtype,
38- "--uds-path" . to_string ( ) ,
39- uds_path. to_string ( ) ,
40- "--logger-level" . to_string ( ) ,
41- "INFO" . to_string ( ) ,
42- "--json-output" . to_string ( ) ,
39+ "--uds-path" . to_owned ( ) ,
40+ uds_path. to_owned ( ) ,
41+ "--logger-level" . to_owned ( ) ,
42+ "INFO" . to_owned ( ) ,
43+ "--json-output" . to_owned ( ) ,
4344 ] ;
4445
4546 // OpenTelemetry
4647 if let Some ( otlp_endpoint) = otlp_endpoint {
47- python_server_args. push ( "--otlp-endpoint" . to_string ( ) ) ;
48+ python_server_args. push ( "--otlp-endpoint" . to_owned ( ) ) ;
4849 python_server_args. push ( otlp_endpoint) ;
4950 }
5051
52+ python_server_args. push ( "--otlp-service-name" . to_owned ( ) ) ;
53+ python_server_args. push ( otlp_service_name) ;
54+
5155 // Copy current process env
5256 let envs: Vec < ( OsString , OsString ) > = env:: vars_os ( ) . collect ( ) ;
5357
@@ -64,7 +68,7 @@ impl BackendProcess {
6468 Err ( err) => {
6569 if err. kind ( ) == io:: ErrorKind :: NotFound {
6670 return Err ( BackendError :: Start (
67- "python-text-embeddings-server not found in PATH" . to_string ( ) ,
71+ "python-text-embeddings-server not found in PATH" . to_owned ( ) ,
6872 ) ) ;
6973 }
7074 return Err ( BackendError :: Start ( err. to_string ( ) ) ) ;
0 commit comments