telemetry

package
v0.0.0-...-56de86b Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Prepended to metrics
	Service = "sharkey"

	// metrics related to github, should be used with other tags
	GitHub = "github"

	// metrics related to background sync jobs, should be used with a broader tag such as "github"
	SyncJob = "sync_job"

	// metrics related to fetching, should be used with a broader tag such as "github"
	Fetch = "fetch"

	// tags that describe the metric being fetched, should be used with other tags
	Calls   = "calls"
	Latency = "latency"
	Count   = "count"
	Success = "success"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsMiddleware

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

func NewMetricsMiddleware

func NewMetricsMiddleware(t *Telemetry) *MetricsMiddleware

func (*MetricsMiddleware) InstrumentHTTPEndpointStats

func (m *MetricsMiddleware) InstrumentHTTPEndpointStats(h http.Handler) http.Handler

type Telemetry

type Telemetry struct {
	Metrics *metrics.Metrics
}

func CreateTelemetry

func CreateTelemetry(addr string) (*Telemetry, error)

Jump to

Keyboard shortcuts

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