Hi Jean,
My apologize for this late answer. Do you have an ASM profile attached to your vHost/VS? Because the default behavior of HTTP profile in LTM is to preserve client headers normally, your issue should not happen.
You can try this iRule otherwise (not tested):
when HTTP_REQUEST {
set HEADER1 [HTTP::header "EXAMPLE_TX_ID"]
set HEADER2 [HTTP::header "EXAMPLE_SPAN_ID"]
}
when HTTP_REQUEST_SEND {
if [string length $HEADER1] {
HTTP::header replace "EXAMPLE_TX_ID" $HEADER1
}
if [string length $HEADER2] {
HTTP::header replace "EXAMPLE_SPAN_ID" $HEADER2
}
}