Add stacksampler to all services

pull/31/head
Mike Lang 6 years ago committed by Mike Lang
parent b9c2921242
commit b75b9a9b00

@ -247,6 +247,7 @@ def main(base_dir='.', stream='', variants='', fill_wait=5, full_fill_wait=180,
nodes = nodes.split(',') if nodes else []
common.PromLogCountsHandler.install()
common.install_stacksampler()
prom.start_http_server(metrics_port)
if backdoor_port:

@ -527,6 +527,7 @@ def main(channel, base_dir=".", qualities="source", metrics_port=8001, backdoor_
manager = StreamsManager(channel, base_dir, qualities)
gevent.signal(signal.SIGTERM, manager.stop) # shut down on sigterm
common.PromLogCountsHandler.install()
common.install_stacksampler()
prom.start_http_server(metrics_port)
if backdoor_port:
gevent.backdoor.BackdoorServer(('127.0.0.1', backdoor_port), locals=locals()).start()

@ -17,7 +17,7 @@ from flask import Flask, url_for, request, abort, Response
from gevent import subprocess
from gevent.pywsgi import WSGIServer
from common import get_best_segments, PromLogCountsHandler
from common import get_best_segments, PromLogCountsHandler, install_stacksampler
import generate_hls
from stats import stats, after_request
@ -421,6 +421,7 @@ def main(host='0.0.0.0', port=8000, base_dir='.', backdoor_port=0):
gevent.signal(signal.SIGTERM, stop)
PromLogCountsHandler.install()
install_stacksampler()
if backdoor_port:
gevent.backdoor.BackdoorServer(('127.0.0.1', backdoor_port), locals=locals()).start()

Loading…
Cancel
Save