Any way to invoke code from VCL after a request has been serviced?

Dridi Boukelmoune dridi at varni.sh
Thu May 18 10:45:07 CEST 2017


On Wed, May 17, 2017 at 11:07 PM, Ryan Burn <rnickb731 at gmail.com> wrote:
>> How about a VMOD doing the only StartSpan, std.log for logging keys
>> and whatnot, and the VUT doing all the rest when it processes the
>> transaction's logs?
>
> But the VUT would be running in a separate process, no? If so, how
> does it access the span object returned when you start the span. The
> OpenTracing API doesn't support augmenting information to a span
> later. The functions to set the tags, finish time, etc all have to act
> on the same object that's returned when you first start the span.

You log whatever needs to ultimately be transmitted to the OT server
and let the VUT pick the logs and do the actual API calls. Performing
blocking (API) calls from VCL is also a performance killer, that's why
Varnish logs in memory and can let VUTs find what they need to do the
dirty work.

Take varnishncsa for example. The varnishd process that is technically
the HTTP server doesn't do access logs and instead it's a separate VUT
that picks up the relevant information from the shmlog to produce
them.

Dridi



More information about the varnish-misc mailing list