Skip to content

Commit

Permalink
CP-51772: Forward baggage from xe-cli
Browse files Browse the repository at this point in the history
If baggage is present in the environment, it will be sent to
xapi-cli-server.

Signed-off-by: Colin James <[email protected]>
  • Loading branch information
contificate committed Nov 26, 2024
1 parent 8e20e3e commit 4eb7185
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ocaml/xe-cli/newcli.ml
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,9 @@ let main () =
let args = String.concat "\n" args in
Printf.fprintf oc "User-agent: xe-cli/Unix/%d.%d\r\n" major minor ;
Option.iter (Printf.fprintf oc "traceparent: %s\r\n") traceparent ;
Option.iter
(Printf.fprintf oc "baggage: %s\r\n")
(Sys.getenv_opt "BAGGAGE") ;
Printf.fprintf oc "content-length: %d\r\n\r\n" (String.length args) ;
Printf.fprintf oc "%s" args ;
flush_all () ;
Expand Down

0 comments on commit 4eb7185

Please sign in to comment.