Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/prometheus/client_golang
/ types & classes
Types & classes
274 in github.com/prometheus/client_golang
⨍
Functions
1,308
◇
Types & classes
274
↓ 22 callers
TypeAlias
UnconstrainedLabels
UnconstrainedLabels represents collection of label without any constraint on their value. Thus, it is simply a collection of label names. Unconstrai
prometheus/labels.go:101
↓ 6 callers
FuncType
ObserverFunc
The ObserverFunc type is an adapter to allow the use of ordinary functions as Observers. If f is a function with the appropriate signature, ObserverFu
prometheus/observer.go:35
↓ 5 callers
TypeAlias
LabelPairSorter
LabelPairSorter implements sort.Interface. It is used to sort a slice of dto.LabelPair pointers.
prometheus/internal/metric.go:24
↓ 5 callers
FuncType
optionApplyFunc
func(*options)
prometheus/promhttp/option.go:59
↓ 3 callers
FuncType
CollectorFunc
CollectorFunc is a convenient way to implement a Prometheus Collector without interface boilerplate. This implementation is based on DescribeByCollect
prometheus/collectorfunc.go:20
↓ 2 callers
FuncType
GathererFunc
GathererFunc turns a function into a Gatherer.
prometheus/registry.go:190
↓ 2 callers
TypeAlias
goVersion
prometheus/gen_go_collector_metrics_set.go:107
↓ 2 callers
TypeAlias
goVersion
prometheus/collectors/gen_go_collector_set.go:179
↓ 2 callers
TypeAlias
quantSort
prometheus/summary.go:537
↓ 1 callers
Interface
Gatherer
Gatherer is the interface for the part of a registry in charge of gathering the collected metrics into a number of MetricFamilies. The Gatherer interf
prometheus/registry.go:140
↓ 1 callers
TypeAlias
Histogram_ResetHint
exp/api/remote/genproto/v2/types.pb.go:103
↓ 1 callers
TypeAlias
Metadata_MetricType
exp/api/remote/genproto/v2/types.pb.go:39
↓ 1 callers
TypeAlias
MetricSorter
MetricSorter is a sortable slice of *dto.Metric.
prometheus/internal/metric.go:39
↓ 1 callers
Interface
ObserverVec
ObserverVec is an interface implemented by `HistogramVec` and `SummaryVec`.
prometheus/observer.go:43
↓ 1 callers
TypeAlias
WriteMessageType
WriteMessageType represents the fully qualified name of the protobuf message to use in Remote write 1.0 and 2.0 protocols. See https://prometheus.io/d
exp/api/remote/remote_headers.go:45
↓ 1 callers
TypeAlias
buckSort
prometheus/histogram.go:1447
↓ 1 callers
Struct
middleware
examples/middleware/httpmiddleware/httpmiddleware.go:31
Interface
API
API provides bindings for Prometheus's v1 API.
api/prometheus/v1/api.go:466
Struct
API
API is a client for Prometheus Remote Protocols. NOTE(bwplotka): Only https://prometheus.io/docs/specs/remote_write_spec_2_0/ is currently implemented
exp/api/remote/remote_api.go:48
FuncType
APIOption
APIOption represents a remote API option.
exp/api/remote/remote_api.go:56
Struct
AcceptSpec
AcceptSpec describes an Accept* header.
internal/github.com/golang/gddo/httputil/header/header.go:58
Struct
ActiveTarget
ActiveTarget models an active Prometheus scrape target.
api/prometheus/v1/api.go:639
Struct
Alert
Alert models an active alert.
api/prometheus/v1/api.go:624
Struct
AlertManager
AlertManager models a configured Alert Manager.
api/prometheus/v1/api.go:528
Struct
AlertManagersResult
AlertManagersResult contains the result from querying the alertmanagers endpoint.
api/prometheus/v1/api.go:522
TypeAlias
AlertState
AlertState models the state of an alert.
api/prometheus/v1/api.go:389
Struct
AlertingRule
AlertingRule models a alerting rule.
api/prometheus/v1/api.go:598
Struct
AlertsResult
AlertsResult contains the result from querying the alerts endpoint.
api/prometheus/v1/api.go:517
Struct
AlreadyRegisteredError
AlreadyRegisteredError is returned by the Register method if the Collector to be registered has already been registered before, or a different Collect
prometheus/registry.go:205
Struct
Backoff
Backoff implements exponential backoff with randomized wait times.
exp/internal/github.com/efficientgo/core/backoff/backoff.go:25
Struct
BackoffConfig
BackoffConfig configures exponential backoff with jitter for retry operations.
exp/api/remote/remote_api.go:39
Struct
Bridge
Bridge pushes metrics to the configured Graphite server.
prometheus/graphite/bridge.go:85
Struct
BucketSpan
A BucketSpan defines a number of consecutive buckets with their offset. Logically, it would be more straightforward to include the bucket counts in th
exp/api/remote/genproto/v2/types.pb.go:839
Struct
BuildinfoResult
BuildinfoResult contains the results from querying the buildinfo endpoint.
api/prometheus/v1/api.go:541
Interface
Client
Client is the interface for an API client.
api/client.go:82
Interface
CloseIdler
api/client.go:87
Struct
ClusterManager
ClusterManager is an example for a system that might have been built without Prometheus in mind. It models a central manager of jobs running in a clus
prometheus/example_clustermanager_test.go:35
Struct
ClusterManagerCollector
ClusterManagerCollector implements the Collector interface.
prometheus/example_clustermanager_test.go:58
Interface
Collector
Collector is the interface implemented by anything that can be used by Prometheus to collect metrics. A Collector has to be registered for collection.
prometheus/collector.go:27
TypeAlias
Compression
Compression represents the content encodings handlers support for the HTTP responses.
prometheus/promhttp/http.go:62
TypeAlias
Compression
Compression represents the encoding. Currently remote storage supports only one, but we experiment with more, thus leaving the compression scaffolding
exp/api/remote/remote_headers.go:35
Struct
Config
Config defines the Graphite bridge config.
prometheus/graphite/bridge.go:56
Struct
Config
Config configures a Backoff.
exp/internal/github.com/efficientgo/core/backoff/backoff.go:18
Struct
Config
Config defines configuration parameters for a new client.
api/client.go:45
Struct
Config
tutorials/whatsup/internal/common.go:37
Struct
ConfigResult
ConfigResult contains the result from querying the config endpoint.
api/prometheus/v1/api.go:533
Interface
ConstrainableLabels
ConstrainableLabels is an interface that allows creating of labels that can be optionally constrained. prometheus.V2().NewCounterVec(CounterVecOpts{
prometheus/labels.go:56
Struct
ConstrainedLabel
ConstrainedLabels represents a label name and its constrain function to normalize label values. This type is commonly used when constructing metric ve
prometheus/labels.go:41
TypeAlias
ConstrainedLabels
ConstrainedLabels represents a collection of label name -> constrain function to normalize label values. This type is commonly used when constructing
prometheus/labels.go:64
Interface
Counter
Counter is a Metric that represents a single numerical value that only ever goes up. That implies that it cannot be used to count items whose number c
prometheus/counter.go:35
Interface
CounterFunc
CounterFunc is a Counter whose value is determined at collect time by calling a provided function. To create CounterFunc instances, use NewCounterFun
prometheus/counter.go:338
TypeAlias
CounterOpts
CounterOpts is an alias for Opts. See there for doc comments.
prometheus/counter.go:61
Struct
CounterVec
CounterVec is a Collector that bundles a set of Counters that all share the same Desc, but have different values for their variable labels. This is us
prometheus/counter.go:189
Struct
CounterVecOpts
CounterVecOpts bundles the options to create a CounterVec metric. It is mandatory to set CounterOpts, see there for mandatory fields. VariableLabels i
prometheus/counter.go:66
Struct
Desc
Desc is the descriptor used by every Prometheus Metric. It is essentially the immutable meta-data of a Metric. The normal Metric implementations inclu
prometheus/desc.go:45
FuncType
DescOpt
DescOpt allows setting optional fields for NewDesc.
prometheus/desc.go:72
Struct
DroppedTarget
DroppedTarget models a dropped Prometheus scrape target.
api/prometheus/v1/api.go:652
Struct
Error
Error is an error returned by the API.
api/prometheus/v1/api.go:447
TypeAlias
ErrorType
ErrorType models the different API error types.
api/prometheus/v1/api.go:392
Struct
Exemplar
Exemplar is easier to use, user-facing representation of *dto.Exemplar.
prometheus/metric.go:228
Struct
Exemplar
Exemplar is an additional information attached to some series' samples. It is typically used to attach an example trace or request ID associated with
exp/api/remote/genproto/v2/types.pb.go:350
Struct
Exemplar
Exemplar is additional information associated with a time series.
api/prometheus/v1/api.go:895
Interface
ExemplarAdder
ExemplarAdder is implemented by Counters that offer the option of adding a value to the Counter together with an exemplar. Its AddWithExemplar method
prometheus/counter.go:56
Interface
ExemplarObserver
ExemplarObserver is implemented by Observers that offer the option of observing a value together with an exemplar. Its ObserveWithExemplar method work
prometheus/observer.go:62
Struct
ExemplarQueryResult
api/prometheus/v1/api.go:901
Struct
Factory
Factory provides factory methods to create Collectors that are automatically registered with a Registerer. Create a Factory with the With function, pr
prometheus/promauto/auto.go:251
TypeAlias
FlagsResult
FlagsResult contains the result from querying the flag endpoint.
api/prometheus/v1/api.go:538
TypeAlias
Gatherers
Gatherers is a slice of Gatherer instances that implements the Gatherer interface itself. Its Gather method calls Gather on all Gatherers in the slice
prometheus/registry.go:790
Interface
Gauge
Gauge is a Metric that represents a single numerical value that can arbitrarily go up and down. A Gauge is typically used for measured values like te
prometheus/gauge.go:32
Interface
GaugeFunc
GaugeFunc is a Gauge whose value is determined at collect time by calling a provided function. To create GaugeFunc instances, use NewGaugeFunc.
prometheus/gauge.go:292
TypeAlias
GaugeOpts
GaugeOpts is an alias for Opts. See there for doc comments.
prometheus/gauge.go:56
Struct
GaugeVec
GaugeVec is a Collector that bundles a set of Gauges that all share the same Desc, but have different values for their variable labels. This is used i
prometheus/gauge.go:147
Struct
GaugeVecOpts
GaugeVecOpts bundles the options to create a GaugeVec metric. It is mandatory to set GaugeOpts, see there for mandatory fields. VariableLabels is opti
prometheus/gauge.go:61
TypeAlias
GoCollectionOption
GoCollectionOption represents Go collection option flag. Deprecated.
prometheus/collectors/go_collector_latest.go:133
Struct
GoCollectorOptions
GoCollectorOptions should not be used be directly by anything, except `collectors` package. Use it via collectors package instead. See issue https://g
prometheus/internal/go_collector_options.go:28
Struct
GoCollectorRule
prometheus/internal/go_collector_options.go:18
Struct
GoRuntimeMetricsRule
GoRuntimeMetricsRule allow enabling and configuring particular group of runtime/metrics. TODO(bwplotka): Consider adding ability to adjust buckets.
prometheus/collectors/go_collector_latest.go:92
Interface
HTTPDoer
HTTPDoer is an interface for the one method of http.Client that is used by Pusher
prometheus/push/push.go:64
TypeAlias
HandlerErrorHandling
HandlerErrorHandling defines how a Handler serving metrics will handle errors.
prometheus/promhttp/http.go:469
TypeAlias
HandlerErrorHandling
HandlerErrorHandling defines how a Handler serving metrics will handle errors.
prometheus/graphite/bridge.go:43
Struct
HandlerOpts
HandlerOpts specifies options how to serve metrics via an http.Handler. The zero value of HandlerOpts is a reasonable default.
prometheus/promhttp/http.go:505
TypeAlias
HealthStatus
HealthStatus models the health status of a scrape target.
api/prometheus/v1/api.go:395
Interface
Histogram
The nativeHistogramBounds above can be generated with the code below. TODO(beorn7): It's tempting to actually use `go generate` to generate the code
prometheus/histogram.go:249
Struct
Histogram
A native histogram, also known as a sparse histogram. Original design doc: https://docs.google.com/document/d/1cLNv3aufPZb3fNfaJgdaRBZsInZKKIHo9E6HinJ
exp/api/remote/genproto/v2/types.pb.go:560
Struct
HistogramOpts
HistogramOpts bundles the options for creating a Histogram metric. It is mandatory to set Name to a non-empty string. All other fields are optional an
prometheus/histogram.go:365
Struct
HistogramVec
HistogramVec is a Collector that bundles a set of Histograms that all share the same Desc, but have different values for their variable labels. This i
prometheus/histogram.go:1177
Struct
HistogramVecOpts
HistogramVecOpts bundles the options to create a HistogramVec metric. It is mandatory to set HistogramOpts, see there for mandatory fields. VariableLa
prometheus/histogram.go:511
Struct
Histogram_CountFloat
exp/api/remote/genproto/v2/types.pb.go:810
Struct
Histogram_CountInt
exp/api/remote/genproto/v2/types.pb.go:806
Struct
Histogram_ZeroCountFloat
exp/api/remote/genproto/v2/types.pb.go:826
Struct
Histogram_ZeroCountInt
exp/api/remote/genproto/v2/types.pb.go:822
Struct
Info
Info implements an info pseudo-metric, which is modeled as a Gauge that always has a value of 1. In practice, you would just use a Gauge directly, but
prometheus/example_metricvec_test.go:30
Struct
InfoVec
InfoVec is the vector version for Info. As an info metric never changes, we wouldn't really need to wrap GetMetricWithLabelValues and GetMetricWith be
prometheus/example_metricvec_test.go:51
Struct
InstrumentTrace
InstrumentTrace is used to offer flexibility in instrumenting the available httptrace.ClientTrace hook functions. Each function is passed a float64 re
prometheus/promhttp/instrument_client.go:136
FuncType
LabelConstraint
LabelConstraint normalizes label values.
prometheus/labels.go:36
FuncType
LabelValueFromCtx
LabelValueFromCtx are used to compute the label value from request context. Context can be filled with values from request through middleware.
prometheus/promhttp/option.go:33
FuncType
LabelValueFromRequest
LabelValueFromRequest is used to compute the label value from request.
prometheus/promhttp/option.go:29
TypeAlias
Labels
Labels represents a collection of label name -> value mappings. This type is commonly used with the With(Labels) and GetMetricWith(Labels) methods of
prometheus/labels.go:33
Struct
Linter
A Linter is a Prometheus metrics linter. It identifies issues with metric names, types, and metadata, and reports them to the caller.
prometheus/testutil/promlint/promlint.go:28
Interface
Logger
Logger is the minimal interface HandlerOpts needs for logging. Note that log.Logger from the standard library implements this interface, and it is eas
prometheus/promhttp/http.go:499
next →
1–100 of 274, ranked by callers