mirror of
https://github.com/directus/directus.git
synced 2026-01-14 16:17:55 -05:00
* initial metrics implementation * secure endpoint * move metric generation to cron * update directus env var list * remove additional space in output * prefer histogram over gauge * add defaults * add tests * metric generation should be done on a per instance basis * add docs * simplify docs * add changeset * add proper capitalization * do not attempt to access redis cache if redis is not available * Update api/src/schedules/metrics.test.ts Co-authored-by: ian <licitdev@gmail.com> * metric lock should not be synchronized * utilize prometheus client * update typing * check db metrics enabled before observe * refactor get/track metric calls * add cluster support * add pm2 aggregation support * rework pm2 aggregation * Update api/src/schedules/metrics.ts Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch> * ensure errors are caught * add metrics bearer type to be inline with auth spec * utilize early returns in access check * at sensible default histogram bucket timeframe * Update docs/self-hosted/config-options.md Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch> * Update docs/reference/system/metrics.md Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch> * do not initialize metrics when it isnt enabled Co-Authored-By: Pascal Jufer <5363448+paescuj@users.noreply.github.com> * fix api build * return null for disabled metrics to be inline with other services * prefere single service metric list env Co-Authored-By: Pascal Jufer <5363448+paescuj@users.noreply.github.com> * Update api/src/metrics/lib/create-metrics.test.ts Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch> * update METRIC_TOKENS description * update create metrics test wording * reorg metric types * Update create-metrics.ts * Enable all metrics services by default * Add full metrics output example * Move enabled check to useMetrics & save results * Adjust types in changeset * metrics is REST API only * update default cron to every minute * update documented metric default schedule * update metric schedule desc to be inline with default * clarify metrics are returned from generated values and not at runtime * add aggregation within pm2 context warning * fix spellcheck * Small grammar fixes for metrics aggregation notice * Add `directus` minor bump Co-authored-by: ian <licitdev@gmail.com> --------- Co-authored-by: ian <licitdev@gmail.com> Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch> Co-authored-by: Pascal Jufer <5363448+paescuj@users.noreply.github.com>