metrics

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Create the tag keys that will be used to add tags to our measurements.
	// Tag keys must conform to the restrictions described in
	// go.opencensus.io/tag/validate.go. Currently those restrictions are:
	// - length between 1 and 255 inclusive
	// - characters are printable US-ASCII
	NamespaceNameKey = tag.MustNewKey(metricskey.LabelNamespaceName)

	BrokerNameKey        = tag.MustNewKey(metricskey.LabelBrokerName)
	EventTypeKey         = tag.MustNewKey(metricskey.LabelEventType)
	TriggerNameKey       = tag.MustNewKey(metricskey.LabelTriggerName)
	TriggerFilterTypeKey = tag.MustNewKey(metricskey.LabelFilterType)

	ResponseCodeKey      = tag.MustNewKey(metricskey.LabelResponseCode)
	ResponseCodeClassKey = tag.MustNewKey(metricskey.LabelResponseCodeClass)

	PodNameKey       = tag.MustNewKey(metricskey.PodName)
	ContainerNameKey = tag.MustNewKey(metricskey.ContainerName)
)

Functions

This section is empty.

Types

type ContainerName

type ContainerName string

type DeliveryReportArgs

type DeliveryReportArgs struct {
	Namespace  string
	Broker     string
	Trigger    string
	FilterType string
}

type DeliveryReporter

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

func NewDeliveryReporter

func NewDeliveryReporter(podName PodName, containerName ContainerName) (*DeliveryReporter, error)

NewDeliveryReporter creates a new DeliveryReporter.

func (*DeliveryReporter) ReportEventDispatchTime

func (r *DeliveryReporter) ReportEventDispatchTime(ctx context.Context, args DeliveryReportArgs, d time.Duration, responseCode int) error

ReportEventDispatchTime captures dispatch times.

func (*DeliveryReporter) ReportEventProcessingTime

func (r *DeliveryReporter) ReportEventProcessingTime(ctx context.Context, args DeliveryReportArgs, d time.Duration) error

ReportEventProcessingTime captures event processing times.

type IngressReportArgs

type IngressReportArgs struct {
	Namespace    string
	Broker       string
	EventType    string
	ResponseCode int
}

type IngressReporter

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

StatsReporter reports ingress metrics.

func NewIngressReporter

func NewIngressReporter(podName PodName, containerName ContainerName) (*IngressReporter, error)

NewIngressReporter creates a new StatsReporter.

func (*IngressReporter) ReportEventDispatchTime

func (r *IngressReporter) ReportEventDispatchTime(ctx context.Context, args IngressReportArgs, d time.Duration) error

type PodName

type PodName string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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