|
|
hai 1 ano | |
|---|---|---|
| .. | ||
| test | %!s(int64=2) %!d(string=hai) anos | |
| .dockerignore | %!s(int64=4) %!d(string=hai) anos | |
| .gitignore | %!s(int64=3) %!d(string=hai) anos | |
| .npmignore | %!s(int64=5) %!d(string=hai) anos | |
| .nvmrc | hai 1 ano | |
| CHANGELOG.md | %!s(int64=3) %!d(string=hai) anos | |
| LICENSE | %!s(int64=2) %!d(string=hai) anos | |
| README.md | %!s(int64=2) %!d(string=hai) anos | |
| buildscript.txt | hai 1 ano | |
| event_loop.js | %!s(int64=4) %!d(string=hai) anos | |
| http.js | %!s(int64=4) %!d(string=hai) anos | |
| index.js | %!s(int64=2) %!d(string=hai) anos | |
| initialize.js | %!s(int64=2) %!d(string=hai) anos | |
| leaked_sockets.js | %!s(int64=3) %!d(string=hai) anos | |
| memory.js | %!s(int64=4) %!d(string=hai) anos | |
| mongodb.js | %!s(int64=2) %!d(string=hai) anos | |
| open_sockets.js | %!s(int64=3) %!d(string=hai) anos | |
| package.json | hai 1 ano | |
| prom_wrapper.js | %!s(int64=3) %!d(string=hai) anos | |
| tsconfig.json | %!s(int64=2) %!d(string=hai) anos | |
| uv_threadpool_size.js | %!s(int64=4) %!d(string=hai) anos | |
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