SRE with .NET

I have found https://oschvr.com/posts/what-id-like-as-sre/  and I trying to answer from the .NET Core application .

How can I check the health of the service ?

Simple : Use https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks

How can I safely and gracefully restart the service

Simple : Use https://www.nuget.org/packages/NetCoreUsefullEndpoints#readme-body-tab

How and why would the service fail ?

Partial answer : same with the health : See sql server at https://tiltwebapp.azurewebsites.net/healthchecks-ui

Do you use appropriate logging levels depending on the environments ?

Answer: Use logging frameworks such as https://www.nuget.org/packages/NLog/ with config file –to let SRE modify levels logged at runtime

What kind of metrics are you exposing

Simple : use grafana, prometheus, azure instrumentation. See https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core?tabs=netcorenew%2Cnetcore6

Is there any documentation/design specification for the service ?

Partial answer: Use OpenAPI  / swagger https://learn.microsoft.com/en-us/training/modules/improve-api-developer-experience-with-swagger/ . For advanced uses  see https://www.nuget.org/packages/NetCore2Blockly/

How does the data flow through the service ?

Not having (yet ) an answer

What is the testing coverage ?

Simple : Use XUnit, NUnit, MsTest with Coverlet with ReportGenerator . For advanced uses see https://github.com/LightBDD/LightBDD and SpecFlow