- log
- init
- recv
- hash
- hit
- miss
- pass
- fetch
- error
- deliver
- log
- Install
- Run
log "syslog " req.service_id " myBigQueryLogger :: {"
# Gotcha: BQ does not accept all ISO8616-compatible timestamps.
# Take care to use a format that can be ingested if you are
# populating a BQ TIMESTAMP field
{""timestamp":""} strftime({"%Y-%m-%dT%H:%M:%S"}, time.start) {"", "}
{""time_elapsed":"} time.elapsed.usec {", "}
{""is_tls":"} if(req.is_ssl, "true", "false") {", "}
{""client_ip":""} {"", "}
{""geo_city":""} client.geo.city {"", "}
{""geo_country_code":""} client.geo.country_code {"", "}
{""request":""} req.request {"", "}
{""host":""} {"", "}
{""url":""} cstr_escape(req.url) {"", "}
{""request_referer":""} cstr_escape() {"", "}
{""request_user_agent":""} cstr_escape() {"", "}
{""request_accept_language":""} cstr_escape() {"", "}
{""request_accept_charset":""} cstr_escape() {"", "}
{""cache_status":""} regsub(fastly_info.state, "^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*", "\2\3") {"""}
"}";