| Index: third_party/buildbot_8_4p1/buildbot/status/web/baseweb.py
|
| diff --git a/third_party/buildbot_8_4p1/buildbot/status/web/baseweb.py b/third_party/buildbot_8_4p1/buildbot/status/web/baseweb.py
|
| index 6c8db66e428774869b0fd3010b9371ab0998d84f..bf80065bc350c0780004d6830103eb5b036accb6 100644
|
| --- a/third_party/buildbot_8_4p1/buildbot/status/web/baseweb.py
|
| +++ b/third_party/buildbot_8_4p1/buildbot/status/web/baseweb.py
|
| @@ -14,7 +14,7 @@
|
| # Copyright Buildbot Team Members
|
|
|
|
|
| -import os, time, weakref
|
| +import os, weakref
|
|
|
| from zope.interface import implements
|
| from twisted.python import log
|
| @@ -42,8 +42,6 @@
|
| from buildbot.status.web.auth import AuthFailResource
|
| from buildbot.status.web.root import RootPage
|
| from buildbot.status.web.change_hook import ChangeHookResource
|
| -
|
| -from infra_libs.ts_mon.common import http_metrics
|
|
|
| # this class contains the WebStatus class. Basic utilities are in base.py,
|
| # and specific pages are each in their own module.
|
| @@ -388,36 +386,8 @@
|
| maxRotatedFiles = either(self.maxRotatedFiles, self.master.log_rotation.maxRotatedFiles)
|
|
|
| if not self.site:
|
| -
|
| - class MonitoredRequest(server.Request):
|
| - def __init__(self, *args, **kwargs):
|
| - server.Request.__init__(self, *args, **kwargs)
|
| - self.startTime = time.time()
|
| -
|
| - def render(self, resrc):
|
| - self.resourceClassName = resrc.__class__.__name__
|
| - server.Request.render(self, resrc)
|
| -
|
| +
|
| class RotateLogSite(server.Site):
|
| - requestFactory = MonitoredRequest
|
| -
|
| - def log(self, request):
|
| - server.Site.log(self, request)
|
| -
|
| - durationMsec = 1000 * (time.time() - request.startTime)
|
| -
|
| - requestLength = request.getHeader('content-length')
|
| - if requestLength is not None:
|
| - requestLength = int(requestLength)
|
| -
|
| - http_metrics.update_http_server_metrics(
|
| - request.resourceClassName,
|
| - request.code,
|
| - durationMsec,
|
| - requestLength,
|
| - request.sentLength,
|
| - request.getHeader('user-agent') or '')
|
| -
|
| def _openLogFile(self, path):
|
| try:
|
| from twisted.python.logfile import LogFile
|
|
|