]> git.kaiwu.me - haproxy.git/commit
MEDIUM: otel: added group action for rule-based scope execution
authorMiroslav Zagorac <mzagorac@haproxy.com>
Sun, 12 Apr 2026 10:20:15 +0000 (12:20 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 13 Apr 2026 07:23:26 +0000 (09:23 +0200)
commit40ac0fd932cd5ea45bc9d73a4e0a878cc13039f6
treefdf1ee1f2e4c620c3e88e08ab5a8dc498e4ac1c0
parentcb4cb1065c00526d992e4259410c2009fdf14ae2
MEDIUM: otel: added group action for rule-based scope execution

Added the "otel-group" action keyword that allows executing a named group
of OTel scopes from HAProxy TCP and HTTP action rule contexts.

The new group.c module registers the "otel-group" keyword for all four
action contexts (tcp-request, tcp-response, http-request, http-response)
and implements the action lifecycle callbacks.

The parser flt_otel_group_parse() accepts a filter ID and group ID as
arguments, duplicates them into the action rule's argument slots, and
wires up the check, action, and release callbacks.

The post-parse validator flt_otel_group_check() resolves the filter ID and
group ID string references into direct configuration pointers by searching
the proxy's filter list for a matching OTel filter and then looking up the
named group within that filter's configuration.

The action handler flt_otel_group_action() retrieves the filter and group
configuration from the resolved rule arguments, verifies the filter is
attached to the stream and not disabled, then iterates through all scopes
in the group and executes each via flt_otel_scope_run() with a shared
timestamp pair.  This allows operators to trigger OTel instrumentation
conditionally from HAProxy rules, for example applying different tracing
scopes based on ACL conditions or request properties.
addons/otel/Makefile
addons/otel/include/group.h [new file with mode: 0644]
addons/otel/include/include.h
addons/otel/src/group.c [new file with mode: 0644]