Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track the 4 golden metrics from the API #6

Merged
merged 18 commits into from
Jul 22, 2023
Merged

Conversation

64J0
Copy link
Owner

@64J0 64J0 commented Apr 9, 2023

Description:

With this PR, I'm going to set up the configuration to keep track of the "4 golden metrics", as stated in the Site Reliability Engineering book, by Google.

One can find more information about it in the following link, that redirects to the right chapter in the book:


In essence, those are the 4 golden signals:

Latency

The time it takes to service a request. It's important to distinguish between the latency of successful requests and the latency of failed requests.

Traffic

A measure of how much demand is being placed on your system, measured in a high-level system-specific metric. For a web service, this measurement is usually HTTP requests per second, perhaps broken out by the nature of the requests (e.g., static versus dynamic content).

Errors

The rate of requests that fail, either explicitly (e.g., HTTP 500s), implicitly (for example, an HTTP 200 success response, but coupled with the wrong content), or by policy (for example, "If you committed to one-second response times, any request over one second is an error").

Saturation

How "full" your service is. A measure of your system fraction, emphasizing the resources that are most constrained (e.g., in a memory-constrained system, show memory; in an I/O-constrained system, show I/O).

How to test it?

TODO

@64J0 64J0 self-assigned this Apr 9, 2023
@64J0
Copy link
Owner Author

64J0 commented Apr 9, 2023

My idea is to expose those metrics using Prometheus, and display it using Grafana.

@64J0
Copy link
Owner Author

64J0 commented Apr 23, 2023

@64J0
Copy link
Owner Author

64J0 commented Apr 23, 2023

@64J0
Copy link
Owner Author

64J0 commented Apr 23, 2023

Saturation metrics:

  • http_requests_in_progress: The number of requests currently in progress in the ASP.NET Core pipeline. One series without controller/action label values counts all in-progress requests, with separate series existing for each controller-action pair.
  • process_virtual_memory_bytes: Virtual memory size in bytes.
  • dotnet_total_memory_bytes: Total known allocated memory.
  • dotnet_collection_count_total: GC collection count.
  • process_cpu_seconds_total: Total user and system CPU time spent in seconds.
  • process_working_set_bytes: Process working set.
  • process_num_threads: Total number of threads.
  • process_private_memory_bytes: Process private memory size.
  • http_requests_received_total: Provides the count of HTTP requests that have been processed by the ASP.NET Core pipeline.
  • process_open_handles: Number of open handles.

@64J0
Copy link
Owner Author

64J0 commented Apr 23, 2023

.NET Grafana dashboard examples:

@64J0 64J0 merged commit d0e9877 into main Jul 22, 2023
1 check passed
@64J0 64J0 deleted the add-four-golden-metrics branch July 22, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Start the metrics server in a different port Using .NET with Chiseled Ubuntu Containers
1 participant