Skip to content

Instantly share code, notes, and snippets.

@ilaif
Created April 16, 2019 20:58
Show Gist options
  • Save ilaif/938ab41fe1c927ca3449a1ae2e608af7 to your computer and use it in GitHub Desktop.
Save ilaif/938ab41fe1c927ca3449a1ae2e608af7 to your computer and use it in GitHub Desktop.
instrument-everything-instrumented-code
sub vcl_recv {
declare local var.log_8 BOOL;
declare local var.log_5 BOOL;
declare local var.log_4 BOOL;
#FASTLY recv
set var.log_4 = true;
if (req.request != "HEAD" && req.request != "GET" && req.request != "FASTLYPURGE") {
set var.log_5 = true;
log "syslog " req.service_id " Px-Instrumentation :: main," + if(var.log_4, "4 ", "") + if(var.log_5, "5 ", "");
return(pass);
}
set var.log_8 = true;
log "syslog " req.service_id " Px-Instrumentation :: main," + if(var.log_4, "4 ", "") + if(var.log_5, "5 ", "") + if(var.log_8, "8 ", "");
return(lookup);
log "syslog " req.service_id " Px-Instrumentation :: main," + if(var.log_4, "4 ", "") + if(var.log_5, "5 ", "") + if(var.log_8, "8 ", "");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment