]> git.kaiwu.me - haproxy.git/commit
MEDIUM: otel: added post-parse configuration check
authorMiroslav Zagorac <mzagorac@haproxy.com>
Sun, 12 Apr 2026 07:58:34 +0000 (09:58 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 13 Apr 2026 07:23:26 +0000 (09:23 +0200)
commitc0fd39457fb11afa3c572274288571490e09cc0c
tree8b2018b773707af23090bb166787441695c7400d
parent2d56399b0c15e14405087a73330e9c8451318ba1
MEDIUM: otel: added post-parse configuration check

Implemented the flt_otel_ops_check() callback that validates the parsed
OTel filter configuration after all HAProxy configuration sections have
been processed.

The check callback performs the following validations: resolves deferred
sample fetch arguments under full frontend and backend capabilities,
verifies uniqueness of filter IDs across all proxies, ensures the
instrumentation section and its configuration file are present, checks
for duplicate group and scope section names, verifies that groups are not
empty, resolves group-to-scope and instrumentation-to-group/scope
cross-references by linking placeholder entries to their definitions,
detects unused scopes, counts root spans and warns when the count differs
from one, and accumulates the required channel analyzer bits from all used
scopes into the instrumentation configuration.

The commit also added the flt_otel_counters structure to track per-event
diagnostic counters in debug builds, the FLT_OTEL_ALERT macro for
filter-scoped error messages, and the FLT_OTEL_DBG_LIST macro for
iterating and dumping named configuration lists.
addons/otel/include/conf.h
addons/otel/include/define.h
addons/otel/include/filter.h
addons/otel/src/filter.c