pocketnetteam / pocketnet.gui

Decentralized social network based on the blockchain
https://pocketnet.app
Apache License 2.0
82 stars 39 forks source link

Analytics of website and desktop application metrics #603

Open andyoknen opened 2 years ago

andyoknen commented 2 years ago

Tasks list

To implement the process of error and warning analysis, the following tasks must be implemented:

Example of HTTP POST Request for add new record - Version 3

curl --location --request POST 'https://metrix.pocketnet.app/front/action/v3' \
--header 'Content-Type: text/plain' \
--data-raw '('\''Warning'\'','\''2022-05-04 08:00:00'\'','\''auth.login.input.change'\'','\''{"value":"private"}'\'','\''Test agent'\'','\''0.0.1'\'','\''Test Session'\'','\''RU'\'')'

Url

https://metrix.pocketnet.app/front/action/v3

Order and type fields

Level         String
Datetime      DateTime
Path          String
Payload       String
Agent         String
Version       String
Session       String
Language      String
andyoknen commented 2 years ago

Metrics naming structure

Level Path PR Description
ℹ️ policy.metriс.approve ? The result of the request for permission to collect anonymous metrics of the application
ℹ️ auth.login.input.change ? The user switched the input field Passphrase / Private key
ℹ️ auth.login.input.paste ? The user inserted the value of the passphrase from the clipboard
ℹ️ auth.login.qr ? The user clicked on the QR code download button to log in
⚠️ auth.login.qr.failed ? Error processing an image uploaded by the user
⚠️ auth.login.input.failed ? The user provided an incorrect private key or passphrase
auth.login.process.failed ? The result of the authorization process ended unsuccessfully
ℹ️ auth.register.icon.select ? The user initiated a dialog box to select the profile icon
⚠️ auth.register.icon.failed ? Invalid format of picture. Only png and jpeg are allowed
⚠️ auth.register.process.break ? The user clicks the "Register" button - although there are reports of incorrect input - eg. To avoid user confusion using Pocketnet in name is reserved
auth.register.process.failed ? The result of the registration process ended unsuccessfully
ℹ️ modal.desktop.notnow ? The user refused to download the desktop application
ℹ️ modal.desktop.download ? The user went to download the desktop application
ℹ️ modal.upgrade.yes ? The user went to upgrade the desktop application
ℹ️ modal.upgrade.no ? The user refused to update the desktop application
ℹ️ main.feed.showmore ? The user went to download the desktop application
ℹ️ main.feed.refresh ? The user uploads new posts via the "Refresh Feed" button
ℹ️ main.navigation.bestfirst ? The user switch radio "The best first"
ℹ️ main.navigation.categories.showmore ? The user expand "Show more (N)"
ℹ️ main.navigation.categories.add ? The user open dialog "Add Category"
ℹ️ main.navigation.tags.showmore ? The user expand "Show more (N)"
ℹ️ main.navigation.explorer ? The user click "Block Explorer"
ℹ️ main.navigation.about ? The user click "About us"
ℹ️ main.navigation.faq ? The user click "F.A.Q."
ℹ️ main.navigation.apps ? The user click "Applications"
ℹ️ main.navigation.helpcenter ? The user click "Help Center"
ℹ️ main.widget.pkoin.buy ? The user click PKOIN widget "Buy"
ℹ️ main.widget.pkoin.howdo ? The user click PKOIN widget "How do I earn more Pocketcoin?"
ℹ️ main.widget.pkoin.collapse ? The user click PKOIN widget ^ for collapse/expand
ℹ️ main.widget.lastcomments.click ? The user click comment in widget
main.widget.lastcomments.notfound ? The user click comment in widget - result "Comment not found"
main.transport.rpc.failed ? Any API request returned with a code NOT 200. The payload must contain the details of the call and the response
⚠️ main.transport.rpc.timeout ? Any API call returned in more than 10 seconds
⚠️ main.transport.rpc.empty ? Any API call returned an empty result
andyoknen commented 2 years ago

Metriсs payload examples

TODO: To work out a single structure of the payload for all types.

policy.metriс.approve

{
  "result": true|false
}
andyoknen commented 2 years ago

FrontendLogger

https://github.com/pocketnetteam/pocketnet.gui/blob/a7bf0cf2d0515aa918ae14d39776c9cbb44711da/js/logger.js#L1-L6

Usage

https://github.com/pocketnetteam/pocketnet.gui/blob/a7bf0cf2d0515aa918ae14d39776c9cbb44711da/js/app.js#L1190

shpingalet007 commented 1 year ago

@andyoknen do you know in what state is this issue?

andyoknen commented 1 year ago

@andyoknen do you know in what state is this issue?

in freeze