]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: opentracing: show return values of all functions in the debug output
authorMiroslav Zagorac <mzagorac@haproxy.com>
Fri, 4 Mar 2022 08:56:00 +0000 (09:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 8 Apr 2022 14:31:33 +0000 (16:31 +0200)
commitca09e01a137ebb557fbda3edb79dd22922753667
tree62b152369b0bcb5803612cb2804cf128287bb26b
parentb536cec2dcf2a29bd57ef9a7400eb9993d1ab4c4
DEBUG: opentracing: show return values of all functions in the debug output

If the OpenTracing filter is compiled using the 'OT_DEBUG=1' option, then
log messages are printed to stderr when the filter is running.  In the log
one can then find (among other things) the order in which the function is
called and the value that the function returns (if it is not a void type).

Prior to applying this patch, no value returned by a function was logged.

Log output example:
  [ 1]    0.038807 [OT]: flt_ot_init_per_thread(0x56365bd45ec0, 0x56365bd48210) {
  [ 1]    0.038807 [OT]:    ot_start(0x56365bd58920, 0x56365bd4e3a0, 0x7f561acba168:(nil)) {
  [ 1]    0.038807 [OT]:    } = 0
  [ 1]    0.038807 [OT]: } = 0

This patch must be backported as far as 2.4.
13 files changed:
addons/ot/include/debug.h
addons/ot/src/cli.c
addons/ot/src/conf.c
addons/ot/src/event.c
addons/ot/src/filter.c
addons/ot/src/group.c
addons/ot/src/http.c
addons/ot/src/opentracing.c
addons/ot/src/parser.c
addons/ot/src/pool.c
addons/ot/src/scope.c
addons/ot/src/util.c
addons/ot/src/vars.c