metrics

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package operations contains all the handlers to convert Auth0 log events (https://auth0.com/docs/deploy-monitor/logs/log-event-type-codes) into prometheus metrics https://docs.google.com/spreadsheets/d/13PsnaBS29mUIjis0HdrpnIrJ_L2rBl2m5dTeYGN46Ho/edit#gid=0

Index

Constants

View Source
const (
	TenantSendEmailOperations = "tenant_send_email_operations_total"
)

Variables

This section is empty.

Functions

func APIOperationFailCounterMetric added in v0.1.0

func APIOperationFailCounterMetric(namespace, subsystem string, applications []*management.Client) *prometheus.CounterVec

func APIOperationTotalCounterMetric added in v0.1.0

func APIOperationTotalCounterMetric(namespace, subsystem string, applications []*management.Client) *prometheus.CounterVec

Types

type LogEventFunc

type LogEventFunc func(m *Metrics, log *management.Log) error

type Metrics

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

See the NewMetrics func for proper descriptions and prometheus names! In case you add a metric here later, make sure to include it in the List method or you'll going to have a bad time.

func New

func New(namespace, subsystem string, applications []*management.Client) *Metrics

Creates and populates a new Metrics struct This is where all the prometheus metrics, names and labels are specified

func (*Metrics) List

func (m *Metrics) List() []prometheus.Collector

List is needed by the server so it can register and collect these metrics

func (*Metrics) ProcessUsers added in v0.2.0

func (m *Metrics) ProcessUsers(users []*management.User) error

func (*Metrics) Update

func (m *Metrics) Update(log *management.Log) error

Jump to

Keyboard shortcuts

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