metrics

package
v0.0.0-...-3a545d7 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// PageViewCount tracks page views by how often they're loaded.
	PageViewCount = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: namespace,
			Subsystem: page,
			Name:      "view_count",
			Help:      "the number of times a given page has been viewed and by what referrer",
		},
		[]string{"domain", "path", "referrer", "country"},
	)

	// PageSessionDuration tracks how long someone spends on an individual page.
	PageSessionDuration = promauto.NewSummaryVec(
		prometheus.SummaryOpts{
			Namespace:  namespace,
			Subsystem:  page,
			Name:       "session_seconds",
			Help:       "how long someone spent on a given page",
			Objectives: defaultObjectives,
		},
		[]string{"domain", "path", "country"},
	)

	// PageSessionsActive provides an approximation of the number of sessions that are currently observing the page.
	PageSessionsActive = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: namespace,
			Subsystem: page,
			Name:      "sessions_active",
			Help:      "the number of current sessions for a given page",
		},
		[]string{"domain", "path", "country"},
	)
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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