From uday.polu at indiamart.com Wed Apr 24 11:23:58 2024 From: uday.polu at indiamart.com (Uday Kumar) Date: Wed, 24 Apr 2024 16:53:58 +0530 Subject: Append uniqueid to a http request at varnish Message-ID: Hello all, We follow below architecture in our production environment: User request ---> Varnish ----> Tomcat Backend We have a requirement of generating an unique id at varnish that can be appended to a request url. So that it can be propagated to the backend and also will be useful in tracking errors efficiently varnish version used: varnish-5.2.1 Example: original request: /search/test?q=bags&source=mobile After appending unique id [This needs to be sent to backend and to be stored in varnish logs]: /search/test?q=bags&source=mobile&uniqueid=abc123 Please help us know if there is any way to do this at varnish *Thanks & Regards,* *Uday Kumar* -------------- next part -------------- An HTML attachment was scrubbed... URL: From guillaume.quintard at gmail.com Wed Apr 24 19:41:57 2024 From: guillaume.quintard at gmail.com (Guillaume Quintard) Date: Wed, 24 Apr 2024 12:41:57 -0700 Subject: Append uniqueid to a http request at varnish In-Reply-To: References: Message-ID: Hi Uday, I feel like we've explored this last year: https://varnish-cache.org/lists/pipermail/varnish-misc/2023-May/027238.html I don't think the answer has changed much: vmod-uuid is your best bet here. Please let me know if I'm missing some requirements. Kind regards, -- Guillaume Quintard On Wed, Apr 24, 2024 at 4:26?AM Uday Kumar wrote: > Hello all, > > We follow below architecture in our production environment: > User request ---> Varnish ----> Tomcat Backend > > We have a requirement of generating an unique id at varnish that can be > appended to a request url. > So that it can be propagated to the backend and also will be useful in > tracking errors efficiently > > varnish version used: varnish-5.2.1 > > Example: > original request: > /search/test?q=bags&source=mobile > > After appending unique id [This needs to be sent to backend and to be > stored in varnish logs]: > /search/test?q=bags&source=mobile&uniqueid=abc123 > > Please help us know if there is any way to do this at varnish > > *Thanks & Regards,* > *Uday Kumar* > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -------------- next part -------------- An HTML attachment was scrubbed... URL: From uday.polu at indiamart.com Thu Apr 25 00:48:08 2024 From: uday.polu at indiamart.com (Uday Kumar) Date: Thu, 25 Apr 2024 06:18:08 +0530 Subject: Append uniqueid to a http request at varnish In-Reply-To: References: Message-ID: Hi Guillaume, Thanks for this reminder, I will check this and get back to you! *Thanks & Regards,* *Uday Kumar* On Thu, Apr 25, 2024 at 1:12?AM Guillaume Quintard < guillaume.quintard at gmail.com> wrote: > Hi Uday, > > I feel like we've explored this last year: > https://varnish-cache.org/lists/pipermail/varnish-misc/2023-May/027238.html > > I don't think the answer has changed much: vmod-uuid is your best bet here. > > Please let me know if I'm missing some requirements. > > Kind regards, > > -- > Guillaume Quintard > > > On Wed, Apr 24, 2024 at 4:26?AM Uday Kumar > wrote: > >> Hello all, >> >> We follow below architecture in our production environment: >> User request ---> Varnish ----> Tomcat Backend >> >> We have a requirement of generating an unique id at varnish that can be >> appended to a request url. >> So that it can be propagated to the backend and also will be useful in >> tracking errors efficiently >> >> varnish version used: varnish-5.2.1 >> >> Example: >> original request: >> /search/test?q=bags&source=mobile >> >> After appending unique id [This needs to be sent to backend and to be >> stored in varnish logs]: >> /search/test?q=bags&source=mobile&uniqueid=abc123 >> >> Please help us know if there is any way to do this at varnish >> >> *Thanks & Regards,* >> *Uday Kumar* >> _______________________________________________ >> varnish-misc mailing list >> varnish-misc at varnish-cache.org >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From uday.polu at indiamart.com Tue Apr 30 08:07:11 2024 From: uday.polu at indiamart.com (Uday Kumar) Date: Tue, 30 Apr 2024 13:37:11 +0530 Subject: Append uniqueid to a http request at varnish In-Reply-To: References: Message-ID: hello Guillaume, I am trying to install vmod_uuid on my centOS 7 machine Resource i used: https://github.com/otto-de/libvmod-uuid/blob/5.x/INSTALL.rst varnish version: 5.2.1 I am getting below errors while running *make *command make[1]: Entering directory `/usr/local/src/libvmod-uuid' Making all in src make[2]: Entering directory `/usr/local/src/libvmod-uuid/src' CC vmod_uuid.lo In file included from vmod_uuid.c:35:0: vcc_if.h:11:1: error: unknown type name ?VCL_STRING? VCL_STRING vmod_uuid(VRT_CTX, struct vmod_priv *); ^ vcc_if.h:11:31: error: expected ?)? before ?struct? VCL_STRING vmod_uuid(VRT_CTX, struct vmod_priv *); ^ vcc_if.h:12:1: error: unknown type name ?VCL_STRING? VCL_STRING vmod_uuid_v1(VRT_CTX, struct vmod_priv *); ^ vcc_if.h:12:34: error: expected ?)? before ?struct? VCL_STRING vmod_uuid_v1(VRT_CTX, struct vmod_priv *); ^ vcc_if.h:13:1: error: unknown type name ?VCL_STRING? VCL_STRING vmod_uuid_v3(VRT_CTX, struct vmod_priv *, VCL_STRING, ^ vcc_if.h:13:34: error: expected ?)? before ?struct? VCL_STRING vmod_uuid_v3(VRT_CTX, struct vmod_priv *, VCL_STRING, ^ vcc_if.h:15:1: error: unknown type name ?VCL_STRING? VCL_STRING vmod_uuid_v4(VRT_CTX, struct vmod_priv *); ^ vcc_if.h:15:34: error: expected ?)? before ?struct? VCL_STRING vmod_uuid_v4(VRT_CTX, struct vmod_priv *); ^ vcc_if.h:16:1: error: unknown type name ?VCL_STRING? VCL_STRING vmod_uuid_v5(VRT_CTX, struct vmod_priv *, VCL_STRING, ^ vcc_if.h:16:34: error: expected ?)? before ?struct? VCL_STRING vmod_uuid_v5(VRT_CTX, struct vmod_priv *, VCL_STRING, ^ vmod_uuid.c:48:17: error: expected ?)? before ?int? mkuuid(VRT_CTX, int utype, uuid_t *uuid, const char *str, va_list ap) ^ vmod_uuid.c:76:1: error: unknown type name ?VCL_STRING? _uuid(VRT_CTX, uuid_t *uuid, int utype, ...) ^ vmod_uuid.c:76:16: error: expected ?)? before ?uuid_t? _uuid(VRT_CTX, uuid_t *uuid, int utype, ...) ^ vmod_uuid.c:104:21: error: expected ?)? before ?void? free_uuids(VRT_CTX, void *priv) ^ vmod_uuid.c:116:39: error: array type has incomplete element type static const struct vmod_priv_methods uuid_priv_task_methods[1] = {{ ^ vmod_uuid.c:117:3: error: field name not in record or union initializer .magic = VMOD_PRIV_METHODS_MAGIC, ^ vmod_uuid.c:117:3: error: (near initialization for ?uuid_priv_task_methods?) vmod_uuid.c:117:12: error: ?VMOD_PRIV_METHODS_MAGIC? undeclared here (not in a function) .magic = VMOD_PRIV_METHODS_MAGIC, ^ vmod_uuid.c:118:3: error: field name not in record or union initializer .type = "vmod_uuid_priv_task", ^ vmod_uuid.c:118:3: error: (near initialization for ?uuid_priv_task_methods?) vmod_uuid.c:119:3: error: field name not in record or union initializer .fini = free_uuids ^ vmod_uuid.c:119:3: error: (near initialization for ?uuid_priv_task_methods?) vmod_uuid.c:119:11: error: ?free_uuids? undeclared here (not in a function) .fini = free_uuids ^ vmod_uuid.c:123:20: error: expected ?)? before ?struct? get_uuids(VRT_CTX, struct vmod_priv *priv, uuid_t **uuid_ns) ^ vmod_uuid.c:163:1: error: unknown type name ?VCL_STRING? VCL_STRING ^ vmod_uuid.c:164:23: error: expected ?)? before ?struct? vmod_uuid_v1(VRT_CTX, struct vmod_priv *priv) ^ vmod_uuid.c:172:1: error: unknown type name ?VCL_STRING? VCL_STRING ^ vmod_uuid.c:173:23: error: expected ?)? before ?struct? vmod_uuid_v3(VRT_CTX, struct vmod_priv *priv, VCL_STRING ns, VCL_STRING name) ^ vmod_uuid.c:182:1: error: unknown type name ?VCL_STRING? VCL_STRING ^ vmod_uuid.c:183:23: error: expected ?)? before ?struct? vmod_uuid_v4(VRT_CTX, struct vmod_priv *priv) ^ vmod_uuid.c:191:1: error: unknown type name ?VCL_STRING? VCL_STRING ^ vmod_uuid.c:192:23: error: expected ?)? before ?struct? vmod_uuid_v5(VRT_CTX, struct vmod_priv *priv, VCL_STRING ns, VCL_STRING name) ^ vmod_uuid.c:201:1: error: unknown type name ?VCL_STRING? VCL_STRING ^ vmod_uuid.c:202:20: error: expected ?)? before ?struct? vmod_uuid(VRT_CTX, struct vmod_priv *priv) ^ vmod_uuid.c:116:39: error: ?uuid_priv_task_methods? defined but not used [-Werror=unused-variable] static const struct vmod_priv_methods uuid_priv_task_methods[1] = {{ ^ cc1: all warnings being treated as errors make[2]: *** [vmod_uuid.lo] Error 1 make[2]: Leaving directory `/usr/local/src/libvmod-uuid/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/libvmod-uuid' make: *** [all] Error 2 Please help *Thanks & Regards,* *Uday Kumar* On Thu, Apr 25, 2024 at 6:18?AM Uday Kumar wrote: > Hi Guillaume, > > Thanks for this reminder, I will check this and get back to you! > > > *Thanks & Regards,* > *Uday Kumar* > > > On Thu, Apr 25, 2024 at 1:12?AM Guillaume Quintard < > guillaume.quintard at gmail.com> wrote: > >> Hi Uday, >> >> I feel like we've explored this last year: >> https://varnish-cache.org/lists/pipermail/varnish-misc/2023-May/027238.html >> >> I don't think the answer has changed much: vmod-uuid is your best bet >> here. >> >> Please let me know if I'm missing some requirements. >> >> Kind regards, >> >> -- >> Guillaume Quintard >> >> >> On Wed, Apr 24, 2024 at 4:26?AM Uday Kumar >> wrote: >> >>> Hello all, >>> >>> We follow below architecture in our production environment: >>> User request ---> Varnish ----> Tomcat Backend >>> >>> We have a requirement of generating an unique id at varnish that can be >>> appended to a request url. >>> So that it can be propagated to the backend and also will be useful in >>> tracking errors efficiently >>> >>> varnish version used: varnish-5.2.1 >>> >>> Example: >>> original request: >>> /search/test?q=bags&source=mobile >>> >>> After appending unique id [This needs to be sent to backend and to be >>> stored in varnish logs]: >>> /search/test?q=bags&source=mobile&uniqueid=abc123 >>> >>> Please help us know if there is any way to do this at varnish >>> >>> *Thanks & Regards,* >>> *Uday Kumar* >>> _______________________________________________ >>> varnish-misc mailing list >>> varnish-misc at varnish-cache.org >>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: