]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: ot: emitted deprecation warning at filter init
authorMiroslav Zagorac <mzagorac@haproxy.com>
Mon, 27 Apr 2026 06:08:39 +0000 (08:08 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 27 Apr 2026 06:18:58 +0000 (08:18 +0200)
The opentracing filter was deprecated in haproxy 3.3 and will be removed
in 3.5.  A warning is now issued during filter initialization, unless the
global 'expose-deprecated-directives' directive is set.  The notice is
emitted only once regardless of the number of filter instances.

addons/ot/src/filter.c

index 0ae542eb4771c65a3e4a9c8235f4791a2545261e..ad8a64c1b145e9e8bc2ecbb37243214cdfc74197 100644 (file)
@@ -155,12 +155,18 @@ static void flt_ot_return_void(const struct filter *f, char **err)
  */
 static int flt_ot_init(struct proxy *p, struct flt_conf *fconf)
 {
+       static int          warnings_emitted = 0;
        struct flt_ot_conf *conf = FLT_OT_DEREF(fconf, conf, NULL);
        char               *err = NULL;
        int                 retval = FLT_OT_RET_ERROR;
 
        FLT_OT_FUNC("%p, %p", p, fconf);
 
+       if (!warnings_emitted && !deprecated_directives_allowed) {
+               warnings_emitted++;
+               ha_warning("The opentracing filter was deprecated in haproxy 3.3 and will be removed in 3.5.\n");
+       }
+
        if (conf == NULL)
                FLT_OT_RETURN_INT(retval);