autometric

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package autometric contains a simple reflect-based OpenTelemetry metric initializer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(m metric.Meter, s any, opts InitOptions) error

Init initialize metrics in given struct s using given meter.

Types

type InitOptions

type InitOptions struct {
	// Prefix defines common prefix for all metrics.
	Prefix string
	// FieldName returns name for given field.
	FieldName func(prefix string, sf reflect.StructField) string
}

InitOptions defines options for Init.

Jump to

Keyboard shortcuts

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