4. OTel configuration
----------------------
-In order for the OTel filter to be used, the 'insecure-fork-wanted' keyword
-must be set in the HAProxy 'global' section. This is required because the
-OpenTelemetry C++ SDK creates background threads for data export and batch
-processing. HAProxy will refuse to load the configuration if this keyword
-is missing.
-
- global
- insecure-fork-wanted
- ...
-
The OTel filter must also be included in the HAProxy configuration, in the
proxy section (frontend / listen / backend):
2. HAProxy filter declaration
------------------------------
-The OTel filter requires the 'insecure-fork-wanted' keyword in the HAProxy
-'global' section. This is necessary because the OpenTelemetry C++ SDK creates
-background threads for data export and batch processing. HAProxy will refuse
-to load the configuration if this keyword is missing.
-
- global
- insecure-fork-wanted
- ...
-
The filter is activated by adding a filter directive in the HAProxy
configuration, in a proxy section (frontend / listen / backend):
#### Activating the filter
-The OTel filter requires the `insecure-fork-wanted` keyword in the HAProxy
-`global` section. This is necessary because the OpenTelemetry C++ SDK creates
-background threads for data export and batch processing. HAProxy will refuse
-to load the configuration if this keyword is missing.
-
-```
-global
- insecure-fork-wanted
- ...
-```
-
Add the filter to a HAProxy proxy section (frontend/listen/backend):
```
*
* DESCRIPTION
* Main filter parser entry point, registered for the "otel" filter keyword.
- * Verifies that insecure-fork-wanted is enabled, then parses the filter ID
- * and configuration file path from the HAProxy configuration line. If no
- * filter ID is specified, the default ID is used.
+ * Parses the filter ID and configuration file path from the HAProxy
+ * configuration line. If no filter ID is specified, the default ID is used.
*
* RETURN VALUE
* Returns ERR_NONE (== 0) in case of success,
OTELC_FUNC("%p, %p, %p, %p, %p:%p, %p", args, cur_arg, px, fconf, OTELC_DPTR_ARGS(err), private);
- if (!(global.tune.options & GTUNE_INSECURE_FORK)) {
- FLT_OTEL_PARSE_ERR(err, "The 'insecure-fork-wanted' option must be enabled in the HAProxy configuration because the OpenTelemetry filter cannot work properly if the creation of threads is forbidden.");
-
- OTELC_RETURN_INT(retval);
- }
-
OTELC_DBG_IFDEF(otelc_dbg_level = FLT_OTEL_DEBUG_LEVEL, );
#ifdef OTELC_DBG_MEM
global
# nbthread 1
- insecure-fork-wanted
maxconn 5000
hard-stop-after 10s
# log localhost:514 local7 debug