Faidon Liambotis has submitted this change and it was merged. Change subject: bits varnish: serve 204s for /statsv ......................................................................
bits varnish: serve 204s for /statsv statsv is a logging beacon endpoint for processing client-side statsd-like performance metrics, generated by MediaWiki's JavaScript code. * Make //bits.wikimedia.org/statsv/* reqs HTTP 204s, like EventLogging's /event.gif endpoint. * Fix the RxURL arg for the Varnishkafka instance to not require an additional slash. * Add a comment explaining both endpoints. Change-Id: I6774c0b6508879226dfb41fb123c9ac4dfe132d3 --- M manifests/role/cache.pp M templates/varnish/bits.inc.vcl.erb 2 files changed, 10 insertions(+), 2 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index 734b101..30d0a85 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -500,7 +500,7 @@ format_type => 'json', topic => 'statsv', varnish_name => $varnish_name, - varnish_opts => { 'm' => 'RxURL:^/statsv\//', }, + varnish_opts => { 'm' => 'RxURL:^/statsv/', }, # By requiring 2 ACKs per message batch, we survive a # single broker dropping out of its leader role, # without seeing lost messages. diff --git a/templates/varnish/bits.inc.vcl.erb b/templates/varnish/bits.inc.vcl.erb index 403733b..86ebb26 100644 --- a/templates/varnish/bits.inc.vcl.erb +++ b/templates/varnish/bits.inc.vcl.erb @@ -23,7 +23,15 @@ <% end -%> sub vcl_recv { - if (req.url ~ "^/event\.gif") { + if (req.url ~ "^/(event\.gif|statsv/)") { + // URLs that start with 'event.gif' or 'statsv' are logging beacon endpoints. + // They are handled by log tailers (varnishkafka and varnishncsa) that filter + // the Varnish shm log for reqs to these endpoints and forward them to log + // processors for storage and analysis. + // + // /event.gif is used by EventLogging <https://wikitech.wikimedia.org/wiki/EventLogging> + // statsv is used by MediaWiki for statsd-like performance metrics. + // Ori is the contact person for both. error 204; } -- To view, visit https://gerrit.wikimedia.org/r/175575 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6774c0b6508879226dfb41fb123c9ac4dfe132d3 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: Faidon Liambotis <fai...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits