Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/prometheus/client_golang
/ functions
Functions
932 in github.com/prometheus/client_golang
⨍
Functions
932
◇
Types & classes
204
↓ 2 callers
Method
NewCounterVec
NewCounterVec works like the function of the same name in the prometheus package but it automatically registers the CounterVec with the Factory's Regi
prometheus/promauto/auto.go:273
↓ 2 callers
Function
NewExpvarCollector
NewExpvarCollector is the obsolete version of collectors.NewExpvarCollector. See there for documentation. Deprecated: Use collectors.NewExpvarCollect
prometheus/expvar_collector.go:29
↓ 2 callers
Method
NewGaugeFunc
NewGaugeFunc works like the function of the same name in the prometheus package but it automatically registers the GaugeFunc with the Factory's Regist
prometheus/promauto/auto.go:316
↓ 2 callers
Method
NewHistogram
NewHistogram works like the function of the same name in the prometheus package but it automatically registers the Histogram with the Factory's Regist
prometheus/promauto/auto.go:348
↓ 2 callers
Method
NewHistogramVec
NewHistogramVec works like the function of the same name in the prometheus package but it automatically registers the HistogramVec with the Factory's
prometheus/promauto/auto.go:359
↓ 2 callers
Function
NewMetricWithTimestamp
NewMetricWithTimestamp returns a new Metric wrapping the provided Metric in a way that it has an explicit timestamp set to the provided Time. This is
prometheus/metric.go:162
↓ 2 callers
Method
Push
Push collects/gathers all metrics from all Collectors and Gatherers added to this Pusher. Then, it pushes them to the Pushgateway configured while cre
prometheus/push/push.go:125
↓ 2 callers
Method
QuickRatio
Return an upper bound on ratio() relatively quickly. This isn't defined beyond that it is an upper bound on .Ratio(), and is faster to compute.
prometheus/internal/difflib.go:484
↓ 2 callers
Method
RealQuickRatio
Return an upper bound on ratio() very quickly. This isn't defined beyond that it is an upper bound on .Ratio(), and is faster to compute than either
prometheus/internal/difflib.go:516
↓ 2 callers
Method
SetSeqs
Set two sequences to be compared.
prometheus/internal/difflib.go:117
↓ 2 callers
Method
Sub
Sub subtracts the given value from the Gauge. (The value can be negative, resulting in an increase of the Gauge.)
prometheus/gauge.go:49
↓ 2 callers
Method
UnmarshalJSON
(b []byte)
api/prometheus/v1/api.go:706
↓ 2 callers
Function
Unregister
Unregister removes the registration of the provided Collector from the DefaultRegisterer. Unregister is a shortcut for DefaultRegisterer.Unregister(c
prometheus/registry.go:185
↓ 2 callers
Method
Unregister
Unregister unregisters the Collector that equals the Collector passed in as an argument. (Two Collectors are considered equal if their Describe metho
prometheus/registry.go:133
↓ 2 callers
Function
WithLabelFromCtx
WithLabelFromCtx registers a label for dynamic resolution with access to context. See the example for ExampleInstrumentHandlerWithLabelResolver for ex
prometheus/promhttp/option.go:80
↓ 2 callers
Function
WithoutGoCollectorRuntimeMetrics
WithoutGoCollectorRuntimeMetrics allows disabling group of runtime/metrics that you might have added in WithGoCollectorRuntimeMetrics. It behaves simi
prometheus/collectors/go_collector_latest.go:115
↓ 2 callers
Function
WrapRegistererWithPrefix
WrapRegistererWithPrefix returns a Registerer wrapping the provided Registerer. Collectors registered with the returned Registerer will be registered
prometheus/wrap.go:74
↓ 2 callers
Function
addWithExemplar
addWithExemplar is a wrapper for [prometheus.ExemplarAdder.AddWithExemplar], which falls back to [prometheus.Counter.Add] if no labels are provided.
prometheus/promhttp/instrument_server.go:43
↓ 2 callers
Function
assertAlmostEqual
(t *testing.T, a, b float64, places int)
prometheus/internal/difflib_test.go:24
↓ 2 callers
Function
atomicAddFloat
atomicAddFloat adds the provided float atomically to another float represented by the bit pattern the bits pointer is pointing to.
prometheus/histogram.go:1546
↓ 2 callers
Function
benchmarkMetricVecWithLabelValues
(b *testing.B, labels map[string][]string)
prometheus/vec_test.go:979
↓ 2 callers
Function
benchmarkSplitLines
(b *testing.B, count int)
prometheus/internal/difflib_test.go:249
↓ 2 callers
Function
checkMetricConsistency
checkMetricConsistency checks if the provided Metric is consistent with the provided MetricFamily. It also hashes the Metric labels and the MetricFami
prometheus/registry.go:868
↓ 2 callers
Function
checkSuffixCollisions
checkSuffixCollisions checks for collisions with the “magic” suffixes the Prometheus text format and the internal metric representation of the Prometh
prometheus/registry.go:807
↓ 2 callers
Function
compareMetricFamilies
compareMetricFamilies would compare 2 slices of metric families, and optionally filters both of them to the `metricNames` provided.
prometheus/testutil/testutil.go:253
↓ 2 callers
Function
constrainLabelValues
(desc *Desc, lvs []string, curry []curriedLabelValue)
prometheus/vec.go:684
↓ 2 callers
Function
convertReaderToMetricFamily
convertReaderToMetricFamily would read from a io.Reader object and convert it to a slice of dto.MetricFamily.
prometheus/testutil/testutil.go:227
↓ 2 callers
Function
defaultGoCollectorOptions
()
prometheus/go_collector_latest.go:149
↓ 2 callers
Function
deleteSyncMap
(m *sync.Map)
prometheus/histogram.go:1464
↓ 2 callers
Function
expectPanic
(t *testing.T, op func(), errorMsg string)
prometheus/counter_test.go:137
↓ 2 callers
Method
findBucket
findBucket returns the index of the bucket for the provided value, or len(h.upperBounds) for the +Inf bucket.
prometheus/histogram.go:831
↓ 2 callers
Function
findMetricWithLabelValues
findMetricWithLabelValues returns the index of the matching metric or len(metrics) if not found.
prometheus/vec.go:565
↓ 2 callers
Function
findMetricWithLabels
findMetricWithLabels returns the index of the matching metric or len(metrics) if not found.
prometheus/vec.go:578
↓ 2 callers
Method
flushColdBuf
flushColdBuf needs mtx locked.
prometheus/summary.go:393
↓ 2 callers
Method
fullURL
fullURL assembles the URL used to push/delete metrics and returns it as a string. The job name and any grouping label values containing a '/' will tri
prometheus/push/push.go:328
↓ 2 callers
Function
generateData
(timeseries, datapoints int)
api/prometheus/v1/api_bench_test.go:26
↓ 2 callers
Method
get
()
prometheus/counter.go:155
↓ 2 callers
Function
getBounds
(vars []float64, q, ε float64)
prometheus/summary_test.go:413
↓ 2 callers
Function
getCumulativeCounts
(vars []float64)
prometheus/histogram_test.go:331
↓ 2 callers
Function
getLe
(key int, schema int32)
prometheus/histogram.go:1483
↓ 2 callers
Method
hashLabelValues
(vals []string)
prometheus/vec.go:250
↓ 2 callers
Method
hashLabels
(labels Labels)
prometheus/vec.go:273
↓ 2 callers
Function
hashNew
hashNew initializies a new fnv64a hash value.
prometheus/fnv.go:24
↓ 2 callers
Function
labelsToLabelPair
(l prometheus.Labels)
prometheus/promhttp/instrument_client_test.go:107
↓ 2 callers
Function
listenGaugeStream
(vals, result chan float64, done chan struct{})
prometheus/gauge_test.go:28
↓ 2 callers
Function
makeInstrumentedHandler
(handler http.HandlerFunc, opts ...Option)
prometheus/promhttp/instrument_server_test.go:358
↓ 2 callers
Function
marshalTimestamp
(timestamp model.Time, stream *json.Stream)
api/prometheus/v1/api.go:230
↓ 2 callers
Function
memStatsFromRM
(ms *runtime.MemStats, rm map[string]*metrics.Sample)
prometheus/go_collector_latest.go:407
↓ 2 callers
Function
memstatNamespace
(s string)
prometheus/go_collector.go:271
↓ 2 callers
Function
min
(a, b int)
prometheus/internal/difflib.go:28
↓ 2 callers
Function
newHistogram
(desc *Desc, opts HistogramOpts, labelValues ...string)
prometheus/histogram.go:513
↓ 2 callers
Function
newSummary
(desc *Desc, opts SummaryOpts, labelValues ...string)
prometheus/summary.go:194
↓ 2 callers
Method
resetCounts
(counts *histogramCounts)
prometheus/histogram.go:1080
↓ 2 callers
Method
roundTripper
()
api/client.go:53
↓ 2 callers
Function
sanitizeMetricFamily
sanitizeMetricFamily is like sanitizeMetric, but for multiple metrics.
prometheus/utils_test.go:43
↓ 2 callers
Method
swapBufs
swapBufs needs mtx AND bufMtx locked, coldBuf must be empty.
prometheus/summary.go:406
↓ 2 callers
Function
testDeletePartialMatch
(t *testing.T, baseVec *GaugeVec)
prometheus/vec_test.go:183
↓ 2 callers
Function
testHandler
(t testing.TB)
prometheus/registry_test.go:53
↓ 2 callers
Function
testMetricVec
(t *testing.T, vec *GaugeVec)
prometheus/vec_test.go:286
↓ 2 callers
Function
unwrapScalarRMValue
unwrapScalarRMValue unwraps a runtime/metrics value that is assumed to be scalar and returns the equivalent float64 value. Panics if the value is not
prometheus/go_collector_latest.go:368
↓ 2 callers
Function
whatsupAddr
(defAddress string)
tutorial/whatsup/internal/common.go:84
↓ 2 callers
Function
wrapDesc
(desc *Desc, prefix string, labels Labels)
prometheus/wrap.go:189
↓ 1 callers
Method
Abbr
()
prometheus/gen_go_collector_metrics_set.go:100
↓ 1 callers
Method
Add
Add adds the given value to the counter. It panics if the value is < 0.
prometheus/counter.go:44
↓ 1 callers
Method
Add
(v float64)
prometheus/counter.go:126
↓ 1 callers
Method
AddCustomValidations
AddCustomValidations adds custom validations to the linter.
prometheus/testutil/promlint/promlint.go:57
↓ 1 callers
Method
AlertManagers
(ctx context.Context)
api/prometheus/v1/api.go:899
↓ 1 callers
Function
AlmostEqualFloat64
AlmostEqualFloat64 returns true if a and b are equal within a relative error of epsilon. See http://floating-point-gui.de/errors/comparison/ for the d
prometheus/internal/almost_equal.go:36
↓ 1 callers
Function
AlmostEqualFloat64s
AlmostEqualFloat64s is the slice form of AlmostEqualFloat64.
prometheus/internal/almost_equal.go:50
↓ 1 callers
Method
Buildinfo
(ctx context.Context)
api/prometheus/v1/api.go:991
↓ 1 callers
Method
CleanTombstones
(ctx context.Context)
api/prometheus/v1/api.go:917
↓ 1 callers
Method
Client
Client sets a custom HTTP client for the Pusher. For convenience, this method returns a pointer to the Pusher itself. Pusher only needs one method of
prometheus/push/push.go:200
↓ 1 callers
Method
CloseNotify
()
prometheus/promhttp/instrument_server_test.go:468
↓ 1 callers
Function
CollectAndCount
CollectAndCount registers the provided Collector with a newly created pedantic Registry. It then calls GatherAndCount with that Registry and with the
prometheus/testutil/testutil.go:127
↓ 1 callers
Method
Config
(ctx context.Context)
api/prometheus/v1/api.go:929
↓ 1 callers
Method
CurryWith
CurryWith returns a vector curried with the provided labels, i.e. the returned vector has those labels pre-set for all labeled operations performed on
prometheus/counter.go:314
↓ 1 callers
Method
CurryWith
(labels prometheus.Labels)
prometheus/example_metricvec_test.go:93
↓ 1 callers
Method
CurryWith
CurryWith returns a vector curried with the provided labels, i.e. the returned vector has those labels pre-set for all labeled operations performed on
prometheus/histogram.go:1230
↓ 1 callers
Method
CurryWith
CurryWith returns a vector curried with the provided labels, i.e. the returned vector has those labels pre-set for all labeled operations performed on
prometheus/summary.go:676
↓ 1 callers
Method
CurryWith
CurryWith returns a vector curried with the provided labels, i.e. the returned vector has those labels pre-set for all labeled operations performed on
prometheus/gauge.go:268
↓ 1 callers
Method
Delete
Delete sends a “DELETE” request to the Pushgateway configured while creating this Pusher, using the configured job name and any added grouping labels
prometheus/push/push.go:239
↓ 1 callers
Method
DeletePartialMatch
DeletePartialMatch deletes all metrics where the variable labels contain all of those passed in as labels. The order of the labels does not matter. It
prometheus/vec.go:113
↓ 1 callers
Method
DeleteSeries
(ctx context.Context, matches []string, startTime, endTime time.Time)
api/prometheus/v1/api.go:947
↓ 1 callers
Method
Do
(_ context.Context, req *http.Request)
api/prometheus/v1/api_test.go:65
↓ 1 callers
Method
DoGetFallback
DoGetFallback will attempt to do the request as-is, and on a 405 or 501 it will fallback to a GET request.
api/prometheus/v1/api.go:1428
↓ 1 callers
Function
ExponentialBucketsRange
ExponentialBucketsRange creates 'count' buckets, where the lowest bucket is 'min' and the highest bucket is 'max'. The final +Inf bucket is not counte
prometheus/histogram.go:333
↓ 1 callers
Method
Flags
(ctx context.Context)
api/prometheus/v1/api.go:973
↓ 1 callers
Method
Flush
()
prometheus/promhttp/instrument_server_test.go:486
↓ 1 callers
Method
Format
Format configures the Pusher to use an encoding format given by the provided expfmt.Format. The default format is expfmt.FmtProtoDelim and should be u
prometheus/push/push.go:227
↓ 1 callers
Method
Gather
Gather implements Gatherer.
prometheus/registry.go:745
↓ 1 callers
Method
Gather
Gather implements TransactionalGatherer interface.
prometheus/registry.go:1010
↓ 1 callers
Function
GatherAndCount
GatherAndCount gathers all metrics from the provided Gatherer and counts them. It returns the number of metric children in all gathered metric familie
prometheus/testutil/testutil.go:143
↓ 1 callers
Function
GatherAndLint
GatherAndLint gathers all metrics from the provided Gatherer and checks them with the linter in the promlint package. If any metricNames are provided,
prometheus/testutil/lint.go:37
↓ 1 callers
Method
GetMetricWith
(labels prometheus.Labels)
prometheus/example_metricvec_test.go:72
↓ 1 callers
Method
GetMetricWith
GetMetricWith returns the Histogram for the given Labels map (the label names must match those of the variable labels in Desc). If that label map is a
prometheus/histogram.go:1184
↓ 1 callers
Method
GetMetricWith
GetMetricWith returns the Summary for the given Labels map (the label names must match those of the variable labels in Desc). If that label map is acc
prometheus/summary.go:630
↓ 1 callers
Method
GetMetricWith
GetMetricWith returns the Gauge for the given Labels map (the label names must match those of the variable labels in Desc). If that label map is acces
prometheus/gauge.go:222
↓ 1 callers
Method
GetMetricWithLabelValues
(lvs ...string)
prometheus/example_metricvec_test.go:67
↓ 1 callers
Method
GetMetricWithLabelValues
GetMetricWithLabelValues returns the Histogram for the given slice of label values (same order as the variable labels in Desc). If that combination of
prometheus/histogram.go:1164
↓ 1 callers
Method
GetMetricWithLabelValues
GetMetricWithLabelValues returns the Summary for the given slice of label values (same order as the variable labels in Desc). If that combination of l
prometheus/summary.go:610
← previous
next →
201–300 of 932, ranked by callers