golang

In cases where instrumenting an application with Prometheus metrics directly is not feasible or when other metric formats needs to be converted to Prometheus exposition format, exporter can be used. Example: node_exporter which has multiple custom collectors for hardware and OS metrics exposed by *NIX kernels.
If you have an application with source code in your control, you can define metrics and add desired instrumentation inline to the code. Let’s look at the required basics and write a direct instrumented random number generator.