Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/prometheus/client_golang
/ functions
Functions
1,308 in github.com/prometheus/client_golang
⨍
Functions
1,308
◇
Types & classes
274
↓ 2 callers
Function
constrainLabelValues
(desc *Desc, lvs []string, curry []curriedLabelValue)
prometheus/vec.go:686
↓ 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:264
↓ 2 callers
Function
deleteSyncMap
(m *sync.Map)
prometheus/histogram.go:1572
↓ 2 callers
Function
expectPanic
(t *testing.T, op func(), errorMsg string)
prometheus/counter_test.go:136
↓ 2 callers
Function
findMetricWithLabelValues
findMetricWithLabelValues returns the index of the matching metric or len(metrics) if not found.
prometheus/vec.go:567
↓ 2 callers
Function
findMetricWithLabels
findMetricWithLabels returns the index of the matching metric or len(metrics) if not found.
prometheus/vec.go:580
↓ 2 callers
Method
flushColdBuf
flushColdBuf needs mtx locked.
prometheus/summary.go:400
↓ 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:156
↓ 2 callers
Function
getBounds
(vars []float64, q, ε float64)
prometheus/summary_test.go:410
↓ 2 callers
Function
getCumulativeCounts
(vars []float64)
prometheus/histogram_test.go:331
↓ 2 callers
Function
getLe
(key int, schema int32)
prometheus/histogram.go:1591
↓ 2 callers
Function
goRuntimeMemStats
goRuntimeMemStats provides the metrics initially provided by runtime.ReadMemStats. From Go 1.17 those similar (and better) statistics are provided by
prometheus/go_collector.go:26
↓ 2 callers
Method
hashLabelValues
(vals []string)
prometheus/vec.go:252
↓ 2 callers
Method
hashLabels
(labels Labels)
prometheus/vec.go:275
↓ 2 callers
Function
hashNew
hashNew initializies a new fnv64a hash value.
prometheus/fnv.go:24
↓ 2 callers
Method
inflightRefs
inflightRefs reports how many callers currently share the in-flight cycle. It lives in the test file so production code carries no test-only hooks; te
prometheus/promhttp/http_test.go:1061
↓ 2 callers
Method
isEnabled
()
prometheus/histogram.go:1697
↓ 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
makeBucketsFromMap
(buckets map[int]int64)
prometheus/histogram.go:2011
↓ 2 callers
Function
makeInstrumentedHandler
(handler http.HandlerFunc, opts ...Option)
prometheus/promhttp/instrument_server_test.go:361
↓ 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:426
↓ 2 callers
Function
minInt
(a, b int)
prometheus/internal/difflib.go:29
↓ 2 callers
Function
negotiateEncodingWriter
negotiateEncodingWriter reads the Accept-Encoding header from a request and selects the right compression based on an allow-list of supported compress
prometheus/promhttp/http.go:644
↓ 2 callers
Function
newBaseGoCollector
()
prometheus/go_collector.go:209
↓ 2 callers
Function
newHistogram
(desc *Desc, opts HistogramOpts, labelValues ...string)
prometheus/histogram.go:539
↓ 2 callers
Function
newSummary
(desc *Desc, opts SummaryOpts, labelValues ...string)
prometheus/summary.go:198
↓ 2 callers
Function
replaceInvalidRune
(c rune)
prometheus/graphite/bridge.go:306
↓ 2 callers
Method
resetCounts
(counts *histogramCounts)
prometheus/histogram.go:1139
↓ 2 callers
Function
retryAfterDuration
retryAfterDuration returns the duration for the Retry-After header. In case of any errors, it returns 0 as if the header was never supplied.
exp/api/remote/remote_api.go:392
↓ 2 callers
Method
roundTripper
()
api/client.go:58
↓ 2 callers
Function
stats
(req *writev2.Request)
exp/api/remote/remote_api_test.go:176
↓ 2 callers
Method
swapBufs
swapBufs needs mtx AND bufMtx locked, coldBuf must be empty.
prometheus/summary.go:413
↓ 2 callers
Function
testDeletePartialMatch
(t *testing.T, baseVec *GaugeVec)
prometheus/vec_test.go:184
↓ 2 callers
Function
testHandler
(t testing.TB)
prometheus/registry_test.go:56
↓ 2 callers
Function
testMetricVec
(t *testing.T, vec *GaugeVec)
prometheus/vec_test.go:287
↓ 2 callers
Function
testV2
()
exp/api/remote/remote_api_test.go:146
↓ 2 callers
Function
toMetricFamilies
(cs ...Collector)
prometheus/wrap_test.go:36
↓ 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:387
↓ 2 callers
Function
validateCount
(sum float64, count uint64, negativeBuckets, positiveBuckets map[int]int64, zeroBucket uint64)
prometheus/histogram.go:1876
↓ 2 callers
Function
whatsupAddr
(defAddress string)
tutorials/whatsup/internal/common.go:84
↓ 2 callers
Function
withDefaultRuntimeMetrics
(metricNames []string, withoutGC, withoutSched bool)
prometheus/collectors/go_collector_latest_test.go:65
↓ 2 callers
Function
wrapDesc
(desc *Desc, prefix string, labels Labels)
prometheus/wrap.go:223
↓ 2 callers
Method
writeHeaders
writeHeaders sets response headers in a given response writer. Make sure to use it before http.ResponseWriter.WriteHeader and .Write.
exp/api/remote/remote_headers.go:135
↓ 1 callers
Method
Abbr
()
prometheus/gen_go_collector_metrics_set.go:113
↓ 1 callers
Method
Abbr
()
prometheus/collectors/gen_go_collector_set.go:185
↓ 1 callers
Method
Add
(v float64)
prometheus/counter.go:127
↓ 1 callers
Method
Add
Add adds the given WriteResponseStats to this WriteResponseStats. If this WriteResponseStats is empty, it will be replaced by the given WriteResponseS
exp/api/remote/remote_headers.go:182
↓ 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:939
↓ 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:1031
↓ 1 callers
Method
CleanTombstones
(ctx context.Context)
api/prometheus/v1/api.go:957
↓ 1 callers
Method
CloseIdleConnections
()
api/client.go:88
↓ 1 callers
Method
CloseNotify
()
prometheus/promhttp/instrument_server_test.go:562
↓ 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:128
↓ 1 callers
Function
CollectAndFormat
CollectAndFormat collects the metrics identified by `metricNames` and returns them in the given format.
prometheus/testutil/testutil.go:238
↓ 1 callers
Method
Config
(ctx context.Context)
api/prometheus/v1/api.go:969
↓ 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:316
↓ 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:1296
↓ 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:684
↓ 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:270
↓ 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:987
↓ 1 callers
Method
Descriptor
()
exp/api/remote/genproto/v2/types.pb.go:86
↓ 1 callers
Method
Descriptor
()
exp/api/remote/genproto/v2/types.pb.go:138
↓ 1 callers
Function
DesymbolizeLabels
DesymbolizeLabels decodes label references, with given symbols to labels.
exp/api/remote/genproto/v2/symbols.go:91
↓ 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 403, 405, or 501 it will fallback to a GET request.
api/prometheus/v1/api.go:1550
↓ 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:339
↓ 1 callers
Method
Flags
(ctx context.Context)
api/prometheus/v1/api.go:1013
↓ 1 callers
Method
Flush
()
prometheus/promhttp/instrument_server_test.go:580
↓ 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
FormatQuery
(ctx context.Context, query string)
api/prometheus/v1/api.go:1448
↓ 1 callers
Method
Gather
Gather implements Gatherer.
prometheus/registry.go:793
↓ 1 callers
Method
Gather
Gather implements TransactionalGatherer interface.
prometheus/registry.go:1058
↓ 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:144
↓ 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:1250
↓ 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:638
↓ 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:224
↓ 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:1230
↓ 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:618
↓ 1 callers
Method
GetMetricWithLabelValues
GetMetricWithLabelValues returns the Gauge for the given slice of label values (same order as the variable labels in Desc). If that combination of lab
prometheus/gauge.go:204
↓ 1 callers
Method
GetTimestamp
()
exp/api/remote/genproto/v2/types.pb.go:477
↓ 1 callers
Method
GetZeroThreshold
()
exp/api/remote/genproto/v2/types.pb.go:711
↓ 1 callers
Function
InstrumentHandlerTimeToWriteHeader
InstrumentHandlerTimeToWriteHeader is a middleware that wraps the provided http.Handler to observe with the provided ObserverVec the request duration
prometheus/promhttp/instrument_server.go:202
↓ 1 callers
Method
LabelNames
(ctx context.Context, matches []string, startTime, endTime time.Time, opts ...Option)
api/prometheus/v1/api.go:1067
↓ 1 callers
Method
LabelValues
(ctx context.Context, label string, matches []string, startTime, endTime time.Time, opts ...Option)
api/prometheus/v1/api.go:1090
↓ 1 callers
Method
MarshalToSizedBuffer
(dAtA []byte)
exp/api/remote/remote_api.go:197
↓ 1 callers
Method
MarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:520
↓ 1 callers
Method
MarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:532
← previous
next →
301–400 of 1,308, ranked by callers