Skip to content

Commit 63a64fc

Browse files
committed
Adding logging strategy to readme
1 parent 2c5650e commit 63a64fc

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
11
# FizzBuzz
22

3-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.1.4.
3+
## Application Logging Strategy
44

5-
## Development server
5+
Several types of application logging could take place in a system like this. We assume that we're in azure but there are equivalents in AWS and GCP.
66

7-
To start a local development server, run:
7+
1. Client side logging
88

9-
```bash
10-
ng serve
11-
```
9+
This kind of logging is useful to track the actions that users take when navigating across the system. It can be useful to log when users get into undesirable states such as in a component that fails `OnInit`. We can implement this in Azure by using the [Javascript Sdk for Application Insights](https://learn.microsoft.com/en-us/azure/azure-monitor/app/javascript-sdk)
1210

13-
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
11+
2. Client side session replay
1412

15-
## Code scaffolding
13+
This strategy involves recording a user's session to get some insight into the exact sequence of actions that led to particular issue or bug. It can also be useful to UX to see how a user finds features. An example of this is [User Pilot](https://userpilot.com/product/session-recording/)
1614

17-
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
15+
3. Server side logging
1816

19-
```bash
20-
ng generate component component-name
21-
```
17+
This kind of logging is useful to track server side exceptions as well as irregular requests. Modern systems will leverage OpenTelemetry to track requests across systems. .NET provides [tooling](https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-enable?tabs=aspnetcore) to enable the application to send logs to Application Insights. In our [API](https://github.com/CSharpFiasco/fizz-buzz-api), we use Serilog to write to a file as an example of basic logging.
18+
19+
4. Exception monitoring
2220

23-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
21+
When things go wrong, [different kinds of alerts](https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-overview) should be setup to inform the appropriate teams about failing systems. This could be as simple as alerts when any exception happens, but could also involve AI-based tools
22+
23+
## Development server
24+
25+
To start a local development server, run:
2426

2527
```bash
26-
ng generate --help
28+
npm run serve
2729
```
2830

31+
Once the server is running, open your browser and navigate to `http://localhost:4200/`
32+
2933
## Building
3034

3135
To build the project run:
3236

3337
```bash
34-
ng build
38+
npm run build
3539
```
3640

37-
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
38-
3941
## Running unit tests
4042

4143
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
@@ -49,7 +51,7 @@ ng test
4951
For end-to-end (e2e) testing, run:
5052

5153
```bash
52-
ng e2e
54+
npm run cypress:run
5355
```
5456

5557
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.

0 commit comments

Comments
 (0)