Skip to content

Commit 9520080

Browse files
authored
Merge pull request #4 from input-output-hk/co-279-document-project-architecture
[CO-279] Document project architecture
2 parents 5d9387e + 783263f commit 9520080

File tree

1 file changed

+118
-0
lines changed

1 file changed

+118
-0
lines changed

README.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,119 @@
11
# log-classifier
2+
3+
The purpose of this project is to analyze Cardano log file and provide a solution to the end user while collecting statistics so Cardano developers can prioritize the issues.
4+
5+
## What it is
6+
7+
- Log-classifier is a [command line interface](https://en.wikipedia.org/wiki/Command-line_interface) IOHK help desk agents can use to classify tickets.
8+
- Currently, identifying the issue manually takes a decent amount of time and knowledge. Using classifier, the agent will be able to automate the identification of the issue without having to know all the known issues.
9+
- This is a Haskell program so the agent will need [stack](https://docs.haskellstack.org/en/stable/README/) and [Nix](https://nixos.org/) in order to use the classifier. Instruction on how to use it will be documented on different file.
10+
- The classifier cannot find any unknown/unique issues.
11+
12+
## How it works
13+
14+
![system architecture](https://user-images.githubusercontent.com/15665039/40042756-5d92611e-585d-11e8-80b4-72677c451dd1.png)<br/>
15+
This is a use case diagram. Use case diagrams overview the usage requirements for a system. They are useful for presentations to management and/or project stakeholders, but for actual development, you will find that use cases provide significantly more value because they describe "the meat" of the actual requirements. For more details, please see [here](http://www.agilemodeling.com/artifacts/useCaseDiagram.htm)
16+
17+
### Overview
18+
19+
- Many of the Daedalus's issues can be identified by analyzing the log file. The classifier will utilize this by analyzing the log file and map with possible solution and problem which can be provided to the end user.
20+
- Ticket sent from Daedalus bug report has log file attached. The classifier will analyze the log file that is attached to the ticket. If any known issues where found, it'll then post a comment to that ticket. (See example below)
21+
- It uses [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) (basically small record file) which contains all the information need to perform the analysis. This makes it easy to add new known issues.
22+
- Help desk agent will use [command line interface](https://en.wikipedia.org/wiki/Command-line_interface) in order to run the classifier.
23+
- The classifier will use the [Zendesk API](https://developer.zendesk.com/rest_api/docs/core/introduction) to perform any action. Because of this, agents will need to provide their email address and password to the classifier.
24+
25+
## Requirements
26+
27+
In order to use this, the user must be IOHK Zendesk agent and be able to provide email and password to the classifier.
28+
29+
## Features
30+
31+
### Provide error text, problem, a solution to the ticket
32+
33+
The classifier will analyze the log file attached to the ticket. If any issues where found, it will post a comment which states
34+
35+
- Error code
36+
- What is the issue
37+
- Possible solution
38+
- Error text classifier caught in the log file that is related to the issue.
39+
40+
See example below.
41+
<br/>
42+
<img src="https://user-images.githubusercontent.com/15665039/39680438-b148ef40-51db-11e8-9d51-f555cebde807.png" alt="analysis" style="width: 700px;"/>
43+
44+
### Add tags to the tickets
45+
46+
After classifier has done analysis on the ticket, it'll add tags to the ticket which can be used to identify what the issues are. Agents can later use this tags to collect statistics. <br />
47+
48+
<img src="https://user-images.githubusercontent.com/15665039/39680413-6c3970a0-51db-11e8-81d9-8c0faf53d1af.png" alt="tags"/><br/>
49+
50+
### Provide statistics of the Zendesk
51+
52+
The classifier can collect all the tags assigned to the ticket, accumulate them and provide to the Zendesk agent as statistics.
53+
54+
```terminal
55+
There are currently **** tickets in the system assigned to *********@iohk.io
56+
*** tickets have been analyzed by the classifier.
57+
**** tickets are not analyzed.
58+
Below are statistics:
59+
analyzed: **
60+
can-not-sync: **
61+
cannot-get-db-size: **
62+
cannot_connect_to_wallet_using_network: **
63+
closed_by_merge: **
64+
coin_redemption: **
65+
connection-refused: **
66+
db-corrupted: **
67+
db-path-error: **
68+
directory-not-found: **
69+
.... and so on
70+
```
71+
72+
### Collect email addresses of the tickets in which both requester and assignee is report server
73+
74+
[Report server](https://github.com/input-output-hk/cardano-report-server) had a bug where it assigned both requester and assignees as report server and write down user's address in the comment section. This made it so that help desk agent where unable to reply back to the user unless agents create new tickets manually which takes some time to reply back. Note that this issue is already fixed.
75+
The classifier can collect email addresses of tickets with this issue.
76+
77+
## Simple use-case scenario
78+
79+
### IOHK help desk agent finds ticket submitted from the end user with log file attached and wants to perform analysis on it
80+
81+
In this case, one can run the command below.
82+
83+
```terminal
84+
./log-classifier-exe process-ticket <TICKET_ID>
85+
```
86+
87+
This will parse the log file attached to the `<TICKET_ID>` and provide the result to the agent using private comment in the Zendesk UI. The agent then use that comment to help troubleshoot the end user.
88+
89+
### IOHK help desk agent wants to parse every ticket that is sent from Daedalus bug report with log file attached
90+
91+
In this case, one can run the command below.
92+
93+
```terminal
94+
./log-classifier-exe process-tickets
95+
```
96+
97+
This will parse any tickets with log file attached that are sent from the Daedalus bug report. It then post analysis result as private comment on any ticket that it has parsed so that the agents can provide the end user with solution.
98+
99+
### IOHK help desk agent wants to know the statistics of the occurring issues so he/she can report to the Cardano-SL team which will categorize/prioritize the issue
100+
101+
In this case, one can run the command below.
102+
103+
```terminal
104+
./log-classifier-exe show-stats
105+
```
106+
107+
This will collect all the tags that are attached to the ticket then group them so that the agent can report the dev team. The team will then categorize/prioritize the issue.
108+
109+
### Some of the tickets has a issue where requester and assignee is report server itself therefore agent must create a new ticket to contact with end user which takes a decent amount of time. Agent wants facilitate this by collecting email addresses of these tickets so he/she can send batch emails to these users
110+
111+
In this case, one can run the command below.
112+
113+
```terminal
114+
./log-classifier-exe collect-emails
115+
```
116+
117+
This will collect all the email addresses with the ticket where the assignee and the requester is report server and write them on a file `emailAddress.txt`. Agent then can later use the text file to send batch emails to the end user.
118+
119+
*Note that this issue has been fixed (meaning all the ticket has appropriate requester assigned to it therefore the agent does not need to create a new ticket to contact with the end user.) so this command is deprecated.

0 commit comments

Comments
 (0)