|
|
3 жил өмнө | |
|---|---|---|
| .. | ||
| .circleci | 5 жил өмнө | |
| test | 3 жил өмнө | |
| .dockerignore | 4 жил өмнө | |
| .gitignore | 5 жил өмнө | |
| .npmignore | 5 жил өмнө | |
| .nvmrc | 3 жил өмнө | |
| CHANGELOG.md | 3 жил өмнө | |
| LICENSE | 12 жил өмнө | |
| README.md | 4 жил өмнө | |
| buildscript.txt | 3 жил өмнө | |
| event_loop.js | 4 жил өмнө | |
| http.js | 4 жил өмнө | |
| index.js | 3 жил өмнө | |
| memory.js | 4 жил өмнө | |
| mongodb.js | 3 жил өмнө | |
| open_sockets.js | 4 жил өмнө | |
| package.json | 3 жил өмнө | |
| prom_wrapper.js | 3 жил өмнө | |
| timeAsyncMethod.js | 4 жил өмнө | |
| tracing.js | 3 жил өмнө | |
| uv_threadpool_size.js | 4 жил өмнө | |
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('@overleaf/logger')
...
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