mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
CLEANUP: otel: removed insecure-fork-wanted requirement
Removed the insecure-fork-wanted runtime check from the OTel filter parser and all related mentions from documentation and test configuration. The OpenTelemetry C wrapper library can now explicitly start all necessary OTel threads immediately after configuration parsing, so it is no longer affected by the HAProxy thread/process creation restriction and the insecure-fork-wanted option is no longer needed.
This commit is contained in:
parent
03df1fe3c9
commit
38126ecd90
@ -194,16 +194,6 @@ the error status.
|
||||
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):
|
||||
|
||||
|
||||
@ -54,15 +54,6 @@ the OTel configuration file using the 'config' keyword inside the
|
||||
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):
|
||||
|
||||
|
||||
@ -108,17 +108,6 @@ The filter uses a two-file configuration model:
|
||||
|
||||
#### 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):
|
||||
|
||||
```
|
||||
|
||||
@ -1720,9 +1720,8 @@ static int flt_otel_parse_cfg(struct flt_otel_conf *conf, const char *flt_name,
|
||||
*
|
||||
* 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,
|
||||
@ -1735,12 +1734,6 @@ static int flt_otel_parse(char **args, int *cur_arg, struct proxy *px, struct fl
|
||||
|
||||
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
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
global
|
||||
# nbthread 1
|
||||
insecure-fork-wanted
|
||||
maxconn 5000
|
||||
hard-stop-after 10s
|
||||
# log localhost:514 local7 debug
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user