This commit fixes a regression likely introduced in PR #79. The module attempts to resolve an uninitialized configuration variable, resulting in an error log.
Resolves #94.
What is happening?
The sampling delegation feature introduced two directives: datadog_delegate_sampling and datadog_allow_sampling_delegation_in_subrequests.
These directives can accept variables and requires NGINX to resolve these variables while processing the request to determine if sampling should be delegated. Since #79, the default values for these directives have not been set, resulting in a malformed NgxScript.
The solution
I removed the ability to extend variables for sampling delegation directives and ensured the underlygin variables are initialized.
For later
Refactor NgxScript to handle compilation error and assert if there is an error.
Description
This commit fixes a regression likely introduced in PR #79. The module attempts to resolve an uninitialized configuration variable, resulting in an error log.
Resolves #94.
What is happening?
The sampling delegation feature introduced two directives:
datadog_delegate_sampling
anddatadog_allow_sampling_delegation_in_subrequests
.These directives can accept variables and requires NGINX to resolve these variables while processing the request to determine if sampling should be delegated. Since #79, the default values for these directives have not been set, resulting in a malformed
NgxScript
.The solution
I removed the ability to extend variables for sampling delegation directives and ensured the underlygin variables are initialized.
For later
Refactor
NgxScript
to handle compilation error and assert if there is an error.