metrics

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultRequestType   = tag.Insert(tagKeyEventType, "plain-http")
	DefaultRequestSource = tag.Insert(tagKeyEventSource, "unknown")
)

Default metric tags for raw requests.

Functions

func CETagsFromContext

func CETagsFromContext(context map[string]string) (tag.Mutator, tag.Mutator)

CETagsFromContext parses Lambda context and returns CloudEvents-specific type and source tags.

Types

type EventProcessingStatsReporter

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

EventProcessingStatsReporter collects and reports stats about the processing of events.

func StatsExporter

func StatsExporter() (*EventProcessingStatsReporter, error)

StatsExporter registers metric views and starts the exporter.

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.

Jump to

Keyboard shortcuts

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