metrics

package
v0.0.0-...-d72cbbf Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const RelayMetricsKind = "relayMetrics"

Variables

View Source
var (
	BrowserConns = Measure{/* contains filtered or unexported fields */}
	MobileConns  = Measure{/* contains filtered or unexported fields */}
	ServerConns  = Measure{/* contains filtered or unexported fields */}

	NewBrowserConns = Measure{/* contains filtered or unexported fields */}
	NewMobileConns  = Measure{/* contains filtered or unexported fields */}
	NewServerConns  = Measure{/* contains filtered or unexported fields */}

	BrowserRequests = Measure{/* contains filtered or unexported fields */}
	MobileRequests  = Measure{/* contains filtered or unexported fields */}
	ServerRequests  = Measure{/* contains filtered or unexported fields */}
)

Functions

func RegisterExporters

func RegisterExporters(options []ExporterOptions) (registrationErr error)

func WithCount

func WithCount(ctx context.Context, userAgent string, f func(), measure Measure)

func WithGauge

func WithGauge(ctx context.Context, userAgent string, f func(), measure Measure)

func WithRouteCount

func WithRouteCount(ctx context.Context, userAgent, route, method string, f func(), measure Measure)

WithRouteCount Records a route hit and starts a trace. For stream connections, the duration of the stream connection is recorded

Types

type DatadogOptions

type DatadogOptions struct {
	Prefix    string
	TraceAddr string
	StatsAddr string
	Tags      []string
}

type ExporterOptions

type ExporterOptions interface {
	// contains filtered or unexported methods
}

type ExporterRegisterer

type ExporterRegisterer func(options ExporterOptions) error

type ExporterType

type ExporterType string

type Measure

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

type OpenCensusEventsExporter

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

func (*OpenCensusEventsExporter) ExportView

func (e *OpenCensusEventsExporter) ExportView(viewData *view.Data)

type OptionEnvName

type OptionEnvName string

type OptionFlushInterval

type OptionFlushInterval time.Duration

type OptionType

type OptionType interface {
	// contains filtered or unexported methods
}

type Processor

type Processor struct {
	OpenCensusCtx context.Context
	// contains filtered or unexported fields
}

func NewMetricsProcessor

func NewMetricsProcessor(publisher events.EventPublisher, options ...OptionType) (*Processor, error)

func (*Processor) Close

func (p *Processor) Close()

type PrometheusOptions

type PrometheusOptions struct {
	Prefix string
	Port   int
}

type RelayMetricsEvent

type RelayMetricsEvent struct {
	Kind           string                     `json:"kind"`
	RelayId        string                     `json:"relayId"`
	StartDate      int64                      `json:"startDate"`
	EndDate        int64                      `json:"endDate"`
	Connections    []currentConnectionsMetric `json:"connections,omitempty"`
	NewConnections []newConnectionsMetric     `json:"newConnections,omitempty"`
}

type StackdriverOptions

type StackdriverOptions struct {
	Prefix    string
	ProjectID string
}

Jump to

Keyboard shortcuts

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