MCPcopy Create free account

hub / github.com/prometheus/client_golang / functions

Functions1,308 in github.com/prometheus/client_golang

↓ 79 callersMethodAdd
Add adds the given value to the Gauge. (The value can be negative, resulting in a decrease of the Gauge.)
prometheus/gauge.go:46
↓ 70 callersMethodWrite
Write encodes the Metric into a "Metric" Protocol Buffer data transmission object. Metric implementations must observe concurrency safety as reads of
prometheus/metric.go:54
↓ 61 callersFunctionNewRegistry
NewRegistry creates a new vanilla Registry without any Collectors pre-registered.
prometheus/registry.go:67
↓ 54 callersMethodError
Error returns the error that was encountered.
prometheus/push/push.go:173
↓ 52 callersMethodString
()
prometheus/desc.go:211
↓ 46 callersMethodMustRegister
MustRegister implements Registerer.
prometheus/registry.go:416
↓ 43 callersMethodRun
Run starts the event loop that pushes Prometheus metrics to Graphite at the configured interval.
prometheus/graphite/bridge.go:150
↓ 40 callersMethodSet
Set sets the Gauge to an arbitrary value.
prometheus/gauge.go:37
↓ 38 callersMethodPrintln
(v ...any)
prometheus/graphite/bridge.go:102
↓ 32 callersFunctionNewCounter
NewCounter creates a new Counter based on the provided CounterOpts. The returned implementation also implements ExemplarAdder. It is safe to perform
prometheus/counter.go:87
↓ 32 callersFunctionNewDesc
NewDesc allocates and initializes a new Desc. Errors are recorded in the Desc and will be reported on registration time. variableLabels and constLabel
prometheus/desc.go:90
↓ 30 callersMethodGather
Gather calls the Collect method of the registered Collectors and then gathers the collected metrics into a lexicographically sorted slice of uniquely
prometheus/registry.go:160
↓ 29 callersFunctionNewCounterVec
NewCounterVec creates a new CounterVec based on the provided CounterOpts and partitioned by the given label names.
prometheus/counter.go:195
↓ 29 callersMethodServeHTTP
(w http.ResponseWriter, req *http.Request)
api/client_test.go:220
↓ 29 callersFunctionwithBaseMetrics
(metricNames []string)
prometheus/collectors/go_collector_latest_test.go:199
↓ 28 callersMethodObserve
Observe adds a single observation to the summary. Observations are usually positive or zero. Negative observations are accepted but prevent current ve
prometheus/summary.go:64
↓ 26 callersMethodMustRegister
MustRegister works like Register but registers any number of Collectors and panics upon the first registration that causes an error.
prometheus/registry.go:119
↓ 26 callersFunctionNewHistogram
NewHistogram creates a new Histogram based on the provided HistogramOpts. It panics if the buckets in HistogramOpts are not in strictly increasing ord
prometheus/histogram.go:526
↓ 25 callersMethodString
()
prometheus/collectors/gen_go_collector_set.go:181
↓ 24 callersMethodInc
Inc increments the Gauge by 1. Use Add to increment it by arbitrary values.
prometheus/gauge.go:40
↓ 24 callersFunctionNewGauge
NewGauge creates a new Gauge based on the provided GaugeOpts. The returned implementation is optimized for a fast Set method. If you have a choice fo
prometheus/gauge.go:78
↓ 24 callersMethodURL
(ep string, args map[string]string)
api/prometheus/v1/api.go:1467
↓ 23 callersFunctionHandlerFor
HandlerFor returns an uninstrumented http.Handler for the provided Gatherer. The behavior of the Handler is defined by the provided HandlerOpts. Thus,
prometheus/promhttp/http.go:225
↓ 22 callersMethodNewDesc
NewDesc allocates and initializes a new Desc. Errors are recorded in the Desc and will be reported on registration time. variableLabels and constLabel
prometheus/desc.go:104
↓ 22 callersFunctionNewPedanticRegistry
NewPedanticRegistry returns a registry that checks during collection if each collected Metric is consistent with its reported Desc, and if the Desc ha
prometheus/registry.go:85
↓ 20 callersMethodReset
Reset deletes all metrics in this vector.
prometheus/vec.go:130
↓ 20 callersFunctionWithUnit
WithUnit sets the unit for a Desc.
prometheus/desc.go:75
↓ 19 callersMethodDo
(context.Context, *http.Request)
api/prometheus/v1/api.go:1468
↓ 19 callersMethodHandle
(context.Context, slog.Record)
exp/api/remote/remote_api.go:129
↓ 19 callersFunctionNewHistogramVec
NewHistogramVec creates a new HistogramVec based on the provided HistogramOpts and partitioned by the given label names.
prometheus/histogram.go:1183
↓ 19 callersFunctionWith
With creates a Factory using the provided Registerer for registration of the created Collectors. If the provided Registerer is nil, the returned Facto
prometheus/promauto/auto.go:258
↓ 18 callersMethodCollect
Collect is called by the Prometheus registry when collecting metrics. The implementation sends each collected metric via the provided channel and retu
prometheus/collector.go:62
↓ 18 callersMethodQuery
Query performs a query for the given time.
api/prometheus/v1/api.go:484
↓ 18 callersMethodRegister
Register registers a new Collector to be included in metrics collection. It returns an error if the descriptors provided by the Collector are invalid
prometheus/registry.go:115
↓ 17 callersMethodContains
(mType WriteMessageType)
exp/api/remote/remote_headers.go:81
↓ 17 callersMethodGather
Gather implements Gatherer.
prometheus/registry.go:435
↓ 17 callersMethodGetValue
()
exp/api/remote/genproto/v2/types.pb.go:470
↓ 17 callersFunctionMustNewConstMetric
MustNewConstMetric is a version of NewConstMetric that panics where NewConstMetric would have returned an error.
prometheus/value.go:126
↓ 17 callersMethodWait
Wait sleeps for the backoff time then increases the retry count and backoff time. Returns immediately if Context is terminated.
exp/internal/github.com/efficientgo/core/backoff/backoff.go:74
↓ 17 callersMethodWithLabelValues
WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allo
prometheus/counter.go:283
↓ 16 callersMethodDesc
Desc returns the descriptor for the Metric. This method idempotently returns the same descriptor throughout the lifetime of the Metric. The returned d
prometheus/metric.go:39
↓ 16 callersFunctionNewGaugeVec
NewGaugeVec creates a new GaugeVec based on the provided GaugeOpts and partitioned by the given label names.
prometheus/gauge.go:153
↓ 15 callersFunctionBuildFQName
BuildFQName joins the given three name components by "_". Empty name components are ignored. If the name parameter itself is empty, an empty string is
prometheus/metric.go:110
↓ 15 callersMethodInc
Inc increments the counter by 1. Use Add to increment it by arbitrary non-negative values.
prometheus/counter.go:41
↓ 15 callersFunctionNewGoCollector
NewGoCollector returns a collector that exports metrics about the current Go process using debug.GCStats (base metrics) and runtime/metrics (both in M
prometheus/collectors/go_collector_latest.go:164
↓ 15 callersFunctiontoNormalizedJSON
toNormalizedJSON removes fake random space from proto JSON original marshaller. It is required, so we can compare proto messages in json format. Read
prometheus/utils_test.go:53
↓ 14 callersFunctionMakeLabelPairs
MakeLabelPairs is a helper function to create protobuf LabelPairs from the variable and constant labels in the provided Desc. The values for the varia
prometheus/value.go:217
↓ 14 callersFunctionNewSummary
Problem with the sliding-window decay algorithm... The Merge method of perk/quantile is actually not working as advertised - and it might be unfixable
prometheus/summary.go:185
↓ 13 callersFunctionSizeOfVarint
SizeOfVarint returns the size of the varint-encoded value.
exp/internal/github.com/planetscale/vtprotobuf/protohelpers/protohelpers.go:38
↓ 12 callersFunctionNewClient
NewClient returns a new Client. It is safe to use the returned Client from multiple goroutines.
api/client.go:94
↓ 12 callersMethodWith
(Labels)
prometheus/observer.go:46
↓ 11 callersMethodMustCurryWith
(Labels)
prometheus/observer.go:49
↓ 11 callersMethodObserve
Observe adds a single observation to the histogram. Observations are usually positive or zero. Negative observations are accepted but prevent current
prometheus/histogram.go:260
↓ 11 callersMethodString
()
exp/api/remote/remote_headers.go:77
↓ 11 callersMethodWithLabelValues
(...string)
prometheus/observer.go:47
↓ 11 callersMethodWriteHeader
(statusCode int)
prometheus/promhttp/delegator_test.go:36
↓ 10 callersFunctionNewSummaryVec
NewSummaryVec creates a new SummaryVec based on the provided SummaryOpts and partitioned by the given label names. Due to the way a Summary is repres
prometheus/summary.go:566
↓ 10 callersMethodStrings
()
exp/api/remote/remote_headers.go:69
↓ 10 callersFunctionvalidateLabelValues
(vals []string, expectedNumberOfValues int)
prometheus/labels.go:166
↓ 9 callersMethodDescribe
Describe sends the super-set of all possible descriptors of metrics collected by this Collector to the provided channel and returns once the last desc
prometheus/collector.go:49
↓ 9 callersFunctionEncodeVarint
EncodeVarint encodes a uint64 into a varint-encoded byte slice and returns the offset of the encoded value. The provided offset is the offset after th
exp/internal/github.com/planetscale/vtprotobuf/protohelpers/protohelpers.go:25
↓ 9 callersFunctionHandlerForTransactional
HandlerForTransactional is like HandlerFor, but it uses transactional gather, which can safely change in-place returned *dto.MetricFamily before call
prometheus/promhttp/http.go:236
↓ 9 callersFunctionInstrumentHandlerCounter
InstrumentHandlerCounter is a middleware that wraps the provided http.Handler to observe the request result with the provided CounterVec. The CounterV
prometheus/promhttp/instrument_server.go:147
↓ 9 callersFunctionInstrumentHandlerDuration
InstrumentHandlerDuration is a middleware that wraps the provided http.Handler to observe the request duration with the provided ObserverVec. The Obse
prometheus/promhttp/instrument_server.go:96
↓ 9 callersFunctionMustRegister
MustRegister registers the provided Collectors with the DefaultRegisterer and panics if any error occurs. MustRegister is a shortcut for DefaultRegis
prometheus/registry.go:176
↓ 9 callersFunctionNewAPI
NewAPI returns a new API for the client. It is safe to use the returned API from multiple goroutines.
api/prometheus/v1/api.go:909
↓ 9 callersFunctionNewGoCollector
NewGoCollector is the obsolete version of collectors.NewGoCollector. See there for documentation. Deprecated: Use collectors.NewGoCollector instead.
prometheus/go_collector_latest.go:167
↓ 9 callersMethodObserveWithExemplar
(value float64, exemplar Labels)
prometheus/observer.go:63
↓ 9 callersFunctioncheckLabels
checkLabels returns whether the provided Collector has a non-const, non-curried label named "code" and/or "method". It panics if the provided Collecto
prometheus/promhttp/instrument_server.go:323
↓ 9 callersFunctionfile_io_prometheus_write_v2_types_proto_rawDescGZIP
()
exp/api/remote/genproto/v2/types.pb.go:1030
↓ 9 callersMethodinit
init provides the selfCollector with a reference to the metric it is supposed to collect. It is usually called within the factory function to create a
prometheus/collector.go:108
↓ 8 callersMethodCurryWith
(Labels)
prometheus/observer.go:48
↓ 8 callersMethodDo
(context.Context, *http.Request)
api/client.go:84
↓ 8 callersMethodGetMetricWithLabelValues
(lvs ...string)
prometheus/observer.go:45
↓ 8 callersFunctionNewMatcher
(a, b []string)
prometheus/internal/difflib.go:103
↓ 8 callersFunctionNewTimer
NewTimer creates a new Timer. The provided Observer is used to observe a duration in seconds. If the Observer implements ExemplarObserver, passing exe
prometheus/timer.go:44
↓ 8 callersMethodRegister
Register implements Registerer.
prometheus/registry.go:283
↓ 8 callersMethodWithLabelValues
WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allo
prometheus/histogram.go:1263
↓ 8 callersFunctionWrapRegistererWith
WrapRegistererWith returns a Registerer wrapping the provided Registerer. Collectors registered with the returned Registerer will be registered with t
prometheus/wrap.go:46
↓ 8 callersFunctionassertEqual
(t *testing.T, a, b any)
prometheus/internal/difflib_test.go:30
↓ 8 callersFunctionlabels
(code, method bool, reqMethod string, status int, extraMethods ...string)
prometheus/promhttp/instrument_server.go:404
↓ 8 callersFunctionrunTests
(t *testing.T, tests []test)
prometheus/testutil/promlint/promlint_test.go:773
↓ 7 callersMethodDeleteLabelValues
DeleteLabelValues removes the metric where the variable labels are the same as those passed in as labels (same order as the VariableLabels in Desc). I
prometheus/vec.go:74
↓ 7 callersMethodError
()
api/prometheus/v1/api.go:453
↓ 7 callersMethodGetMetricWith
(Labels)
prometheus/observer.go:44
↓ 7 callersMethodGetType
()
exp/api/remote/genproto/v2/types.pb.go:533
↓ 7 callersMethodHeader
Header sets a custom HTTP header for the Pusher's client. For convenience, this method returns a pointer to the Pusher itself.
prometheus/push/push.go:207
↓ 7 callersMethodObserveDuration
ObserveDuration records the duration passed since the Timer was created with NewTimer. It calls the Observe method of the Observer provided during con
prometheus/timer.go:59
↓ 7 callersFunctionSkip
Skip the first record of the byte slice and return the offset of the next record.
exp/internal/github.com/planetscale/vtprotobuf/protohelpers/protohelpers.go:48
↓ 7 callersMethodapply
(*options)
prometheus/promhttp/option.go:25
↓ 7 callersFunctiondefaultOptions
()
prometheus/promhttp/option.go:42
↓ 7 callersMethodemptyDynamicLabels
()
prometheus/promhttp/option.go:49
↓ 7 callersFunctionformatTime
(t time.Time)
api/prometheus/v1/api.go:1578
↓ 7 callersFunctionnewDelegator
(w http.ResponseWriter, observeWriteHeaderFunc func(int))
prometheus/promhttp/delegator.go:355
↓ 6 callersFunctionCollectAndCompare
CollectAndCompare collects the metrics identified by `metricNames` and compares them in the Prometheus text exposition format to the data read from ex
prometheus/testutil/testutil.go:196
↓ 6 callersMethodDelete
Delete deletes the metric where the variable labels are the same as those passed in as labels. It returns true if a metric was deleted. It is not an
prometheus/vec.go:95
↓ 6 callersMethodDoGetFallback
(ctx context.Context, u *url.URL, args url.Values)
api/prometheus/v1/api.go:1469
↓ 6 callersMethodErr
Err returns an error that occurred during construction, if any. Calling this method is optional. It can be used to detect construction errors early,
prometheus/desc.go:207
↓ 6 callersMethodFlush
()
prometheus/promhttp/delegator.go:98
↓ 6 callersMethodNewCounterVec
NewCounterVec creates a new CounterVec based on the provided CounterVecOpts.
prometheus/counter.go:203
next →1–100 of 1,308, ranked by callers