metrics

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 2 Imported by: 0

README

Metrics

This package provides Prometheus metrics integration for web applications.

Usage

Register the metrics endpoint:

import (
    "net/http"
    "github.com/mariusfa/golf/metrics"
)

func main() {
    router := http.NewServeMux()
    metrics.RegisterRoute(router)
    http.ListenAndServe(":8080", router)
}

The metrics endpoint will be available at GET /metrics and returns Prometheus-formatted metrics data.

Integration

This endpoint is commonly used by monitoring systems like Prometheus to scrape application metrics.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoute

func RegisterRoute(router *http.ServeMux)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL