Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/platform/knowledge-graph/advanced-configuration/enable-prom-metrics-collection/runtimes/golang.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/platform/knowledge-graph/advanced-configuration/enable-prom-metrics-collection/runtimes/golang/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Menu
Documentation
Grafana Cloud
Platform
Knowledge graph
Advanced configuration
Enable metrics collection
Run times
GoLang
Grafana Cloud
Configure golang to generate Prometheus metrics
For instructions on how to instrument a Go application with Prometheus exporter, refer to