|
|
vor 5 Jahren | |
|---|---|---|
| .. | ||
| .circleci | vor 6 Jahren | |
| test | vor 5 Jahren | |
| .eslintrc | vor 6 Jahren | |
| .gitignore | vor 5 Jahren | |
| .npmignore | vor 6 Jahren | |
| .prettierrc | vor 6 Jahren | |
| LICENSE | vor 12 Jahren | |
| README.md | vor 5 Jahren | |
| buildscript.txt | vor 5 Jahren | |
| event_loop.js | vor 6 Jahren | |
| http.js | vor 5 Jahren | |
| index.js | vor 5 Jahren | |
| memory.js | vor 6 Jahren | |
| mongodb.js | vor 6 Jahren | |
| open_sockets.js | vor 6 Jahren | |
| package-lock.json | vor 5 Jahren | |
| package.json | vor 5 Jahren | |
| prom_wrapper.js | vor 5 Jahren | |
| timeAsyncMethod.js | vor 6 Jahren | |
| uv_threadpool_size.js | vor 6 Jahren | |
Wrappers the prom-client npm module to provide Prometheus metrics at /metrics.
Use:
const metrics = require('@overleaf/metrics')
metrics.initialize('myapp')
const express = require('express')
const app = express()
metrics.injectMetricsRoute(app)
Request logging can be enabled:
const logger = require('logger-sharelatex')
...
app.use(metrics.http.monitor(logger))
The metrics module can be configured through the following environment variables:
DEBUG_METRICS - enables display of debugging messages to the console.ENABLE_TRACE_AGENT - enables @google-cloud/trace-agent on Google CloudENABLE_DEBUG_AGENT - enables @google-cloud/debug-agent on Google CloudENABLE_PROFILE_AGENT - enables @google-cloud/profiler on Google CloudMETRICS_COMPRESSION_LEVEL - sets the compression level for /metricsSTACKDRIVER_LOGGING - toggles the request logging formatUV_THREADPOOL_SIZE - sets the libuv thread pool size