metrics

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package metrics contains interfaces for reporting OpenCensus stats to a metrics backend, such as Prometheus.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustRegisterEventProcessingStatsView

func MustRegisterEventProcessingStatsView()

MustRegisterEventProcessingStatsView registers an OpenCensus stats view for metrics related to events processing, and panics in case of error.

func TagEventSource

func TagEventSource(val string) tag.Mutator

TagEventSource returns a tag mutator that injects the value of the "event_source" tag.

func TagEventType

func TagEventType(val string) tag.Mutator

TagEventType returns a tag mutator that injects the value of the "event_type" tag.

Types

type EventProcessingStatsReporter

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

EventProcessingStatsReporter collects and reports stats about the processing of CloudEvents.

func MustNewEventProcessingStatsReporter

func MustNewEventProcessingStatsReporter(tags *pkgadapter.MetricTag) *EventProcessingStatsReporter

MustNewEventProcessingStatsReporter returns a new EventProcessingStatsReporter initialized with the given tags and panics in case of error.

func (*EventProcessingStatsReporter) ReportProcessingError

func (r *EventProcessingStatsReporter) ReportProcessingError(userManaged bool, tms ...tag.Mutator)

ReportProcessingError increments eventProcessingErrorCountM.

func (*EventProcessingStatsReporter) ReportProcessingLatency

func (r *EventProcessingStatsReporter) ReportProcessingLatency(d time.Duration, tms ...tag.Mutator)

ReportProcessingLatency records in eventProcessingLatenciesM the processing duration of an event.

func (*EventProcessingStatsReporter) ReportProcessingSuccess

func (r *EventProcessingStatsReporter) ReportProcessingSuccess(tms ...tag.Mutator)

ReportProcessingSuccess increments eventProcessingSuccessCountM.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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