metrics

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

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