Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
don't need the resource portion
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl committed May 21, 2018
1 parent 02c1d29 commit c60e0d5
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions synapse/metrics/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from twisted.web.resource import Resource

import synapse.metrics


METRICS_PREFIX = "/_synapse/metrics"


class MetricsResource(Resource):
isLeaf = True

def __init__(self, hs):
Resource.__init__(self) # Resource is old-style, so no super()

self.hs = hs

def render_GET(self, request):
response = synapse.metrics.render_all()

request.setHeader("Content-Type", "text/plain")
request.setHeader("Content-Length", str(len(response)))

# Encode as UTF-8 (default)
return response.encode()

0 comments on commit c60e0d5

Please sign in to comment.