examples

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunExample

func RunExample()

RunExample runs all demonstration functions

Types

type ProductionMetricsExample

type ProductionMetricsExample struct {
	// contains filtered or unexported fields
}

ProductionMetricsExample demonstrates production-grade label usage

func NewProductionMetricsExample

func NewProductionMetricsExample() *ProductionMetricsExample

NewProductionMetricsExample creates a new example instance

func (*ProductionMetricsExample) DemonstrateFormatting

func (p *ProductionMetricsExample) DemonstrateFormatting()

DemonstrateFormatting shows format-specific label output

func (*ProductionMetricsExample) DemonstrateValidation

func (p *ProductionMetricsExample) DemonstrateValidation()

DemonstrateValidation shows label validation examples

func (*ProductionMetricsExample) GetCardinalityStats

func (p *ProductionMetricsExample) GetCardinalityStats()

GetCardinalityStats returns current cardinality statistics

func (*ProductionMetricsExample) RecordCacheOperation

func (p *ProductionMetricsExample) RecordCacheOperation(operation, status string)

RecordCacheOperation demonstrates cache metric labeling

func (*ProductionMetricsExample) RecordDatabaseQuery

func (p *ProductionMetricsExample) RecordDatabaseQuery(
	operation, table, status string,
	duration time.Duration,
)

RecordDatabaseQuery demonstrates database metric labeling

func (*ProductionMetricsExample) RecordHTTPRequest

func (p *ProductionMetricsExample) RecordHTTPRequest(
	method, path string,
	statusCode int,
	duration time.Duration,
)

RecordHTTPRequest demonstrates proper HTTP metric labeling

Jump to

Keyboard shortcuts

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