Ori.livneh has submitted this change and it was merged.

Change subject: Set up a beacon namespace on bits
......................................................................


Set up a beacon namespace on bits

The multimedia team needs an additional logging beacon endpoint on bits (bug
T89088). Rather than add yet another usecase-specific endpoint, let's act with
foresight and establish a namespacing convention:

* All requests to //bits.wikimedia.org/beacon/.. get an HTTP 204.
* Internal users can claim /beacon/<application>?...

Demuxing the request log into individual log buckets will be done by the log
processors.

Change-Id: I92ecf8f9876586238acc77849b7ff240ace7a391
---
M templates/varnish/bits.inc.vcl.erb
1 file changed, 12 insertions(+), 8 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved
  Ottomata: Looks good to me, but someone else must approve
  BBlack: Looks good to me, but someone else must approve



diff --git a/templates/varnish/bits.inc.vcl.erb 
b/templates/varnish/bits.inc.vcl.erb
index 037a74d..bf698e3 100644
--- a/templates/varnish/bits.inc.vcl.erb
+++ b/templates/varnish/bits.inc.vcl.erb
@@ -21,15 +21,19 @@
 <% end -%>
 
 sub vcl_recv {
-       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.
+       if (req.url ~ "^/(event\.gif|beacon\/[^/?]+|statsv[/?])") {
+               // Logging beacon endpoints
                //
-               // /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.
+               // 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 (owner: analytics)
+               // * /statsv is used by MediaWiki for statsd-like performance 
metrics (owner: Ori)
+               // * /beacon/ is used by all other applications.
+               //
+               // If you need a custom endpoint, don't modify this regex. Tack 
on a path component
+               // to /beacon to claim a namespace instead -- e.g.: 
/beacon/images?...
                error 204;
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/192370
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I92ecf8f9876586238acc77849b7ff240ace7a391
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Nuria <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to