mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-19 13:54:36 -04:00
Run Prometheus on a different port, optionally. (#3274)
This commit is contained in:
parent
c936a52a9e
commit
febe0ec8fd
16 changed files with 192 additions and 26 deletions
|
@ -39,7 +39,8 @@ HAVE_PROC_SELF_STAT = os.path.exists("/proc/self/stat")
|
|||
|
||||
class RegistryProxy(object):
|
||||
|
||||
def collect(self):
|
||||
@staticmethod
|
||||
def collect():
|
||||
for metric in REGISTRY.collect():
|
||||
if not metric.name.startswith("__"):
|
||||
yield metric
|
||||
|
|
|
@ -13,4 +13,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from prometheus_client.twisted import MetricsResource
|
||||
|
||||
METRICS_PREFIX = "/_synapse/metrics"
|
||||
|
||||
__all__ = ["MetricsResource", "METRICS_PREFIX"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue