MCPcopy Create free account

hub / github.com/prometheus/client_golang / functions

Functions932 in github.com/prometheus/client_golang

↓ 62 callersMethodString
()
prometheus/desc.go:184
↓ 62 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
↓ 55 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
↓ 45 callersFunctionNewRegistry
NewRegistry creates a new vanilla Registry without any Collectors pre-registered.
prometheus/registry.go:67
↓ 44 callersMethodError
Error returns the error that was encountered.
prometheus/push/push.go:173
↓ 32 callersMethodMustRegister
MustRegister implements Registerer.
prometheus/registry.go:402
↓ 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:78
↓ 32 callersMethodRun
Run starts the event loop that pushes Prometheus metrics to Graphite at the configured interval.
prometheus/graphite/bridge.go:150
↓ 29 callersMethodSet
Set sets the Gauge to an arbitrary value.
prometheus/gauge.go:37
↓ 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
↓ 28 callersMethodPrintln
(v ...interface{})
prometheus/graphite/bridge.go:102
↓ 27 callersFunctionNewCounterVec
NewCounterVec creates a new CounterVec based on the provided CounterOpts and partitioned by the given label names.
prometheus/counter.go:194
↓ 25 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
↓ 23 callersMethodInc
Inc increments the Gauge by 1. Use Add to increment it by arbitrary values.
prometheus/gauge.go:40
↓ 22 callersMethodURL
(ep string, args map[string]string)
api/prometheus/v1/api.go:1345
↓ 21 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
↓ 21 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:501
↓ 19 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 callersMethodDo
(context.Context, *http.Request)
api/prometheus/v1/api.go:1346
↓ 18 callersFunctionNewHistogramVec
NewHistogramVec creates a new HistogramVec based on the provided HistogramOpts and partitioned by the given label names.
prometheus/histogram.go:1118
↓ 18 callersMethodReset
Reset deletes all metrics in this vector.
prometheus/vec.go:130
↓ 17 callersMethodGather
Gather implements Gatherer.
prometheus/registry.go:411
↓ 17 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
↓ 16 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
↓ 16 callersMethodServeHTTP
(w http.ResponseWriter, req *http.Request)
api/client_test.go:124
↓ 16 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
↓ 16 callersMethodWithLabelValues
WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allo
prometheus/counter.go:281
↓ 15 callersFunctionNewGaugeVec
NewGaugeVec creates a new GaugeVec based on the provided GaugeOpts and partitioned by the given label names.
prometheus/gauge.go:152
↓ 14 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:107
↓ 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:182
↓ 14 callersMethodQuery
Query performs a query for the given time.
api/prometheus/v1/api.go:482
↓ 13 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:89
↓ 13 callersFunctionMustNewConstMetric
MustNewConstMetric is a version of NewConstMetric that panics where NewConstMetric would have returned an error.
prometheus/value.go:126
↓ 13 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
↓ 12 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
↓ 12 callersMethodWith
(Labels)
prometheus/observer.go:46
↓ 12 callersFunctionwithBaseMetrics
(metricNames []string)
prometheus/collectors/go_collector_latest_test.go:132
↓ 11 callersMethodMustCurryWith
(Labels)
prometheus/observer.go:49
↓ 11 callersMethodWithLabelValues
(...string)
prometheus/observer.go:47
↓ 11 callersMethodWriteHeader
(code int)
prometheus/promhttp/delegator.go:55
↓ 11 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
↓ 10 callersMethodInc
Inc increments the counter by 1. Use Add to increment it by arbitrary non-negative values.
prometheus/counter.go:41
↓ 10 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
↓ 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 callersFunctionNewClient
NewClient returns a new Client. It is safe to use the returned Client from multiple goroutines.
api/client.go:85
↓ 9 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:559
↓ 9 callersMethodRegister
Register implements Registerer.
prometheus/registry.go:270
↓ 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:311
↓ 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 callersMethodGetMetricWithLabelValues
(lvs ...string)
prometheus/observer.go:45
↓ 8 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:135
↓ 8 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
↓ 8 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:869
↓ 8 callersFunctionNewMatcher
(a, b []string)
prometheus/internal/difflib.go:102
↓ 8 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
↓ 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 callersMethodWithLabelValues
WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allo
prometheus/histogram.go:1197
↓ 8 callersFunctionassertEqual
(t *testing.T, a, b interface{})
prometheus/internal/difflib_test.go:30
↓ 8 callersFunctionlabels
(code, method bool, reqMethod string, status int, extraMethods ...string)
prometheus/promhttp/instrument_server.go:392
↓ 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:451
↓ 7 callersMethodGetMetricWith
(Labels)
prometheus/observer.go:44
↓ 7 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:84
↓ 7 callersFunctionNewGoCollector
NewGoCollector is the obsolete version of collectors.NewGoCollector. See there for documentation. Deprecated: Use collectors.NewGoCollector instead.
prometheus/go_collector_go116.go:42
↓ 7 callersFunctionNewGoCollector
NewGoCollector returns a collector that exports metrics about the current Go process. This includes memory stats. To collect those, runtime.ReadMemSta
prometheus/collectors/go_collector_go116.go:47
↓ 7 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:254
↓ 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 callersMethodObserveWithExemplar
(value float64, exemplar Labels)
prometheus/observer.go:63
↓ 7 callersFunctionWrapRegistererWith
WrapRegistererWith returns a Registerer wrapping the provided Registerer. Collectors registered with the returned Registerer will be registered with t
prometheus/wrap.go:46
↓ 7 callersMethodapply
(*options)
prometheus/promhttp/option.go:24
↓ 7 callersFunctiondefaultOptions
()
prometheus/promhttp/option.go:38
↓ 7 callersMethodemptyDynamicLabels
()
prometheus/promhttp/option.go:45
↓ 7 callersFunctionformatTime
(t time.Time)
api/prometheus/v1/api.go:1456
↓ 7 callersFunctionnewDelegator
(w http.ResponseWriter, observeWriteHeaderFunc func(int))
prometheus/promhttp/delegator.go:349
↓ 7 callersFunctionrunTests
(t *testing.T, tests []test)
prometheus/testutil/promlint/promlint_test.go:773
↓ 6 callersFunctionCollectAndCompare
CollectAndCompare registers the provided Collector with a newly created pedantic Registry. It then calls GatherAndCompare with that Registry and with
prometheus/testutil/testutil.go:190
↓ 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 callersMethodNewCounterVec
NewCounterVec creates a new CounterVec based on the provided CounterVecOpts.
prometheus/counter.go:202
↓ 6 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:92
↓ 6 callersFunctionWithGoCollectorRuntimeMetrics
WithGoCollectorRuntimeMetrics allows enabling and configuring particular group of runtime/metrics. See the list of metrics https://golang.bg/src/runti
prometheus/collectors/go_collector_latest.go:100
↓ 6 callersFunctionvalidateLabelValues
(vals []string, expectedNumberOfValues int)
prometheus/labels.go:166
↓ 5 callersMethodDoGetFallback
(ctx context.Context, u *url.URL, args url.Values)
api/prometheus/v1/api.go:1347
↓ 5 callersFunctionHandler
Handler returns an http.Handler for the prometheus.DefaultGatherer, using default HandlerOpts, i.e. it reports the first error as an HTTP error, it ha
prometheus/promhttp/http.go:77
↓ 5 callersMethodNewGaugeVec
NewGaugeVec creates a new GaugeVec based on the provided GaugeVecOpts.
prometheus/gauge.go:160
↓ 5 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:162
↓ 5 callersFunctionNewMetricVec
NewMetricVec returns an initialized metricVec.
prometheus/vec.go:47
↓ 5 callersFunctionNewProcessCollector
NewProcessCollector is the obsolete version of collectors.NewProcessCollector. See there for documentation. Deprecated: Use collectors.NewProcessColl
prometheus/process_collector.go:60
↓ 5 callersFunctionWithGoCollectorMemStatsMetricsDisabled
WithGoCollectorMemStatsMetricsDisabled disables metrics that is gathered in runtime.MemStats structure such as: go_memstats_alloc_bytes go_memstats_a
prometheus/collectors/go_collector_latest.go:82
↓ 5 callersMethodWithLabelValues
WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allo
prometheus/summary.go:643
↓ 5 callersMethodWithLabelValues
WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allo
prometheus/gauge.go:235
↓ 5 callersFunctionbenchmarkMetricVecWithLabelValuesCardinality
(b *testing.B, nkeys, nvalues int)
prometheus/vec_test.go:941
↓ 5 callersFunctionobserveWithExemplar
observeWithExemplar is a wrapper for [prometheus.ExemplarAdder.ExemplarObserver], which falls back to [prometheus.Observer.Observe] if no labels are p
prometheus/promhttp/instrument_server.go:33
↓ 5 callersFunctionpopulateMetric
( t ValueType, v float64, labelPairs []*dto.LabelPair, e *dto.Exemplar, m *dto.Metric, ct *timestamppb.T
prometheus/value.go:188
↓ 5 callersFunctionsplitChars
(s string)
prometheus/internal/difflib_test.go:36
↓ 5 callersFunctionwaitForCooldown
waitForCooldown returns after the count field in the provided histogramCounts has reached the provided count value.
prometheus/histogram.go:1538
↓ 4 callersMethodDo
(*http.Request)
prometheus/push/push.go:65
↓ 4 callersMethodDo
(context.Context, *http.Request)
api/client.go:79
↓ 4 callersFunctionExponentialBuckets
ExponentialBuckets creates 'count' regular buckets, where the lowest bucket has an upper bound of 'start' and each following bucket's upper bound is '
prometheus/histogram.go:309
↓ 4 callersMethodGetOpCodes
Return list of 5-tuples describing how to turn a into b. Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple has i1 == j1 == 0, and rem
prometheus/internal/difflib.go:378
next →1–100 of 932, ranked by callers