|
|
2 лет назад | |
|---|---|---|
| .. | ||
| test | 2 лет назад | |
| .dockerignore | 4 лет назад | |
| .gitignore | 3 лет назад | |
| .npmignore | 5 лет назад | |
| .nvmrc | 2 лет назад | |
| CHANGELOG.md | 3 лет назад | |
| LICENSE | 12 лет назад | |
| README.md | 2 лет назад | |
| buildscript.txt | 2 лет назад | |
| event_loop.js | 4 лет назад | |
| http.js | 4 лет назад | |
| index.js | 2 лет назад | |
| initialize.js | 2 лет назад | |
| leaked_sockets.js | 3 лет назад | |
| memory.js | 4 лет назад | |
| mongodb.js | 3 лет назад | |
| open_sockets.js | 3 лет назад | |
| package.json | 2 лет назад | |
| prom_wrapper.js | 3 лет назад | |
| timeAsyncMethod.js | 4 лет назад | |
| tsconfig.json | 2 лет назад | |
| uv_threadpool_size.js | 4 лет назад | |
Wrappers the prom-client npm module to provide Prometheus metrics at /metrics.
Use:
// Metrics must be initialized before importing anything else
require('@overleaf/metrics/initialize')
const express = require('express')
const metrics = require('@overleaf/metrics')
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.GCP_OPENTELEMETRY - enables OpenTelemetry tracing for GCPJAEGER_OPENTELEMETRY - enables OpenTelemetry tracing for Jaeger (in the dev environment)METRICS_APP_NAME - the app label for metrics and spansMETRICS_COMPRESSION_LEVEL - sets the compression level for /metricsSTACKDRIVER_LOGGING - toggles the request logging formatUV_THREADPOOL_SIZE - sets the libuv thread pool size