This repository was archived by the owner on Jun 24, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 155
Metrics, metrics endpoint, and showing cool data #2024
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
This is what the output looks like. For Prometheus:
and then in JSON (in case someone wants it for something, or even for the Homepage implementation): (v23.11.0) [root on DESKTOP-8EMKV7Q] ~/repos/TriliumNext/Notes on feat/metrics-endpoint:feat/metrics-endpoint
Γ¥» curl 'http://localhost:8080/etapi/metrics?format=json' -H "Authorization: lQsQRo00SfO4_G8nxsbhOWuWF3hzxcmQB8rviQz/Xg7cnEiv4Yu6blR4=" | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 927 100 927 0 0 82451 0 --:--:-- --:--:-- --:--:-- 84272
{
"version": {
"app": "0.94.0",
"db": 231,
"node": "v23.11.0",
"sync": 35,
"buildDate": "2025-04-10T18:06:20Z",
"buildRevision": "3df666b03e55a7719958a20cbd9e14601d7da580"
},
"database": {
"totalNotes": 427,
"deletedNotes": 0,
"activeNotes": 427,
"protectedNotes": 0,
"totalAttachments": 18,
"deletedAttachments": 0,
"activeAttachments": 18,
"totalRevisions": 1,
"totalBranches": 441,
"totalAttributes": 739,
"totalBlobs": 147,
"totalEtapiTokens": 1,
"totalRecentNotes": 11,
"totalEmbeddings": 0,
"totalEmbeddingProviders": 1
},
"noteTypes": {
"doc": 179,
"text": 115,
"code": 25,
"launcher": 25,
"book": 21,
"contentWidget": 16,
"mermaid": 13,
"image": 12,
"render": 7,
"file": 5,
"webView": 5,
"canvas": 1,
"geoMap": 1,
"mindMap": 1,
"noteMap": 1
},
"attachmentTypes": {
"image/svg+xml": 16,
"image/jpg": 2
},
"statistics": {
"oldestNote": "2025-05-02 21:35:41.912Z",
"newestNote": "2025-05-14 20:43:17.404Z",
"lastModified": "2025-05-14 20:43:52.313Z",
"databaseSizeBytes": 2514944
},
"timestamp": "2025-05-26T20:55:47.487Z"
} |
eliandoran
approved these changes
May 27, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes TriliumNext/Trilium#4971
I'm not sure if (or how) we would like to expose these values to the client? What do you think would be the best way? Of course there are several reasons why we would like to have them available, I'm not sure of the best way to show them in the client...