A beginner's guide to learning Go by instrumenting a Go application for Prometheus metrics. This tutorial covers building a Prometheus metrics exporter to consolidate analytics and metrics from Datadog's SLO product. Key steps include parsing the Datadog API response, creating necessary structs in Go, declaring Prometheus metrics, initializing the Datadog client, fetching SLO data, and pushing the metrics to Prometheus.
Table of contents
Learning Go by Instrumenting a Go Application for Prometheus MetricsA Beginner’s PerspectiveDatadog API Response ExampleExporter RequirementsConstructing Structs to Match API ResponseGlobal Variables and Metric DeclarationsImplementing the ExporterKey Concepts in Prometheus Client LibraryUsing Prometheus Pull (Alternative to Push)ReferencesSort: