instrumentation

package
v0.0.0-...-6cc63a5 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Namespace is the Prometheus Namespace in all metrics published by the xp app
	Namespace string = "mlp"
	// Subsystem is the Prometheus Subsystem in all metrics published by the xp app
	Subsystem string = "xp_treatment_service"
	// FetchTreatmentRequestDurationMs is the key to measure http requests for fetching treatment
	FetchTreatmentRequestDurationMs metrics.MetricName = "fetch_treatment_request_duration_ms"
	// ExperimentLookupDurationMs is the key to measure experiment lookup duration
	ExperimentLookupDurationMs metrics.MetricName = "experiment_lookup_duration_ms"
	// FetchTreatmentRequestCount is the key to measure no. of fetch treatment requests
	FetchTreatmentRequestCount metrics.MetricName = "fetch_treatment_request_count"
	// NoMatchingExperimentRequestCount is the key to measure no. of fetch treatment requests with no matching experiments
	NoMatchingExperimentRequestCount metrics.MetricName = "no_matching_experiment_request_count"
	// FetchTreatmentRequestDurationMsHelpString is the help string of the FetchTreatmentRequestDurationMs metric
	FetchTreatmentRequestDurationMsHelpString string = "Histogram for the runtime (in milliseconds) of Fetch Treatment requests"
	// ExperimentLookupDurationMsHelpString is the help string of the ExperimentLookupDurationMs metric
	ExperimentLookupDurationMsHelpString string = "Histogram for the runtime (in milliseconds) of experiment lookup"
	// FetchTreatmentRequestCountHelpString is the help string of the FetchTreatmentRequestCount metric
	FetchTreatmentRequestCountHelpString string = "Counter for no. of Fetch Treatment requests with matching experiments"
	// NoMatchingExperimentRequestCountHelpString is the help string of the NoMatchingExperimentRequestCount metric
	NoMatchingExperimentRequestCountHelpString string = "Counter for no. of Fetch Treatment requests with no matching experiments"
)

Variables

View Source
var AdditionalFetchTreatmentRequestCountLabels = []string{"project_name", "experiment_name", "treatment_name",
	"response_code"}

AdditionalFetchTreatmentRequestCountLabels defines additional labels needed for the FetchTreatmentRequestCount counter map

View Source
var AdditionalNoMatchingExperimentRequestCountLabels = []string{"project_name", "response_code"}

AdditionalNoMatchingExperimentRequestCountLabels defines additional labels needed for the NoMatchingExperimentRequestCount counter map

View Source
var ExperimentLookupDurationMsLabels = []string{"project_name"}

ExperimentLookupDurationMsLabels defines additional labels needed for the ExperimentLookupDurationMs histogram map

View Source
var FetchTreatmentRequestDurationMsLabels = []string{"project_name", "experiment_name", "treatment_name", "response_code"}

FetchTreatmentRequestDurationMsLabels defines additional labels needed for the FetchTreatmentRequestDurationMs histogram map

View Source
var RequestLatencyBuckets = []float64{
	5, 10, 15, 20, 30, 40, 50, 100, 200, 500, 1000,
}

RequestLatencyBuckets defines the buckets used in the custom Histogram metrics

Functions

func GetCounterMap

func GetCounterMap(labels []string) map[metrics.MetricName]metrics.PrometheusCounterVec

Types

This section is empty.

Jump to

Keyboard shortcuts

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