DotMetrics service monitoring

We are pleased to make public our first open-source project: DotMetrics, a service-monitoring side-car for DotNet applications.

At 4OTC, we benefit from the use of many excellent open-source libraries and utilities. We strongly believe in the open-source philosophy, so whenever possible, we aim to contribute back to the wider community with any tools or utilities that we are able to share.

Our first open-source project is DotMetrics - our service-monitoring side-car process. DotMetrics hooks into the built-in counters exposed by the DotNet runtime, and publishes those values to an event-sink. We use InfluxDB as our time-series database, and Grafana to display metrics in chart form.

At 4OTC we run ultra low-latency services, with tight control over memory and CPU resources; for this reason, it is necessary to have a monitoring solution that is as lightweight as possible. Since the collection of these counter values is done via an IPC (EventPipe), aggregation and publication of metrics does not have any adverse effect on the service being monitored.

In addition to the built-in counters, the DotNet runtime allows user code to publish its own counters. We use this function in our services to publish application-specific data for monitoring purposes.

DotMetrics does not enforce any particular deployment mode, so users must create their own application to execute the monitoring process; we deploy DotMetrics as a systemd service. DotMetrics needs to be supplied with the PID of the monitored process in order to connect to the metrics publication IPC. The current implementation has plugins to allow attaching to a service instance via systemd on Linux, but we expect different methods will be used depending on the deployment model in use.

Examples for getting started are available in the Github repository.

DotMetrics is published as an artifact on Nuget.

4OTC are hiring to expand our Development Team. If you are interested in working on high performance systems in a collaborative, inclusive team, see our Careers section.