How to observe producer retries

I want to optimize Kafka producer config about retry, I prepare a weak network environment by tc(add latency between local and broker), when start pub message, get this error

{"errno":-192,"err_msg":"Local: Message timed out"}

How can I verify that a retry happened?
In https://github.com/confluentinc/librdkafka/blob/49f180a36c247100dc246379ace84833b91f4038/STATISTICS.md i get this metric

txretries | int |   | Total number of request retries

In my case, this metrics always 0
How to know if a retry was made before the timeout occurred