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
↓ 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:202
↓ 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:190
↓ 1 callers
Method
LabelNames
(ctx context.Context, matches []string, startTime, endTime time.Time)
api/prometheus/v1/api.go:1027
↓ 1 callers
Method
LabelValues
(ctx context.Context, label string, matches []string, startTime, endTime time.Time)
api/prometheus/v1/api.go:1049
↓ 1 callers
Method
Metadata
(ctx context.Context, metric, limit string)
api/prometheus/v1/api.go:1257
↓ 1 callers
Method
MustCurryWith
MustCurryWith works as CurryWith but panics where CurryWith would have returned an error.
prometheus/counter.go:324
↓ 1 callers
Function
MustNewConstMetricWithCreatedTimestamp
MustNewConstMetricWithCreatedTimestamp is a version of NewConstMetricWithCreatedTimestamp that panics where NewConstMetricWithCreatedTimestamp would h
prometheus/value.go:163
↓ 1 callers
Function
MustNewMetricWithExemplars
MustNewMetricWithExemplars is a version of NewMetricWithExemplars that panics where NewMetricWithExemplars would have returned an error.
prometheus/metric.go:251
↓ 1 callers
Function
NewBuildInfoCollector
NewBuildInfoCollector is the obsolete version of collectors.NewBuildInfoCollector. See there for documentation. Deprecated: Use collectors.NewBuildIn
prometheus/build_info_collector.go:22
↓ 1 callers
Function
NewClusterManager
NewClusterManager first creates a Prometheus-ignorant ClusterManager instance. Then, it creates a ClusterManagerCollector for the just created Cluster
prometheus/example_clustermanager_test.go:115
↓ 1 callers
Function
NewConstHistogram
NewConstHistogram returns a metric representing a Prometheus histogram with fixed values for the count, sum, and bucket counts. As those parameters ca
prometheus/histogram.go:1301
↓ 1 callers
Function
NewConstSummary
NewConstSummary returns a metric representing a Prometheus summary with fixed values for the count, sum, and quantiles. As those parameters cannot be
prometheus/summary.go:749
↓ 1 callers
Function
NewCounterFunc
NewCounterFunc creates a new CounterFunc based on the provided CounterOpts. The value reported is determined by calling the given function from within
prometheus/counter.go:351
↓ 1 callers
Method
NewCounterFunc
NewCounterFunc works like the function of the same name in the prometheus package but it automatically registers the CounterFunc with the Factory's Re
prometheus/promauto/auto.go:284
↓ 1 callers
Function
NewDBStatsCollector
NewDBStatsCollector returns a collector that exports metrics about the given *sql.DB. See https://golang.org/pkg/database/sql/#DBStats for more inform
prometheus/collectors/dbstats_collector.go:40
↓ 1 callers
Method
NewGaugeVec
NewGaugeVec works like the function of the same name in the prometheus package but it automatically registers the GaugeVec with the Factory's Register
prometheus/promauto/auto.go:305
↓ 1 callers
Function
NewInfoVec
(name, help string, labelNames []string)
prometheus/example_metricvec_test.go:55
↓ 1 callers
Function
NewInvalidDesc
NewInvalidDesc returns an invalid descriptor, i.e. a descriptor with the provided error set. If a collector returning such a descriptor is registered,
prometheus/desc.go:178
↓ 1 callers
Function
NewMatcherWithJunk
(a, b []string, autoJunk bool, isJunk func(string) bool, )
prometheus/internal/difflib.go:108
↓ 1 callers
Function
NewMetricWithExemplars
NewMetricWithExemplars returns a new Metric wrapping the provided Metric with given exemplars. Exemplars are validated. Only last applicable exemplar
prometheus/metric.go:225
↓ 1 callers
Function
NewMetrics
(reg prometheus.Registerer, normMean, normDomain float64)
examples/random/main.go:38
↓ 1 callers
Function
NewMultiTRegistry
NewMultiTRegistry creates MultiTRegistry.
prometheus/registry.go:1003
↓ 1 callers
Function
NewPidFileFn
NewPidFileFn returns a function that retrieves a pid from the specified file. It is meant to be used for the PidFn field in ProcessCollectorOpts.
prometheus/process_collector.go:151
↓ 1 callers
Method
NewSummary
NewSummary works like the function of the same name in the prometheus package but it automatically registers the Summary with the Factory's Registerer
prometheus/promauto/auto.go:326
↓ 1 callers
Method
NewSummaryVec
NewSummaryVec works like the function of the same name in the prometheus package but it automatically registers the SummaryVec with the Factory's Regi
prometheus/promauto/auto.go:337
↓ 1 callers
Function
NewUntypedFunc
NewUntypedFunc creates a new UntypedFunc based on the provided UntypedOpts. The value reported is determined by calling the given function from within
prometheus/untyped.go:35
↓ 1 callers
Method
NewUntypedFunc
NewUntypedFunc works like the function of the same name in the prometheus package but it automatically registers the UntypedFunc with the Factory's Re
prometheus/promauto/auto.go:370
↓ 1 callers
Function
NewWithMetricFamilies
NewWithMetricFamilies creates a new Linter that reads from a slice of MetricFamily protobuf messages.
prometheus/testutil/promlint/promlint.go:50
↓ 1 callers
Method
ObserveDurationWithExemplar
ObserveDurationWithExemplar is like ObserveDuration, but it will also observe exemplar with the duration unless exemplar is nil or provided Observer c
prometheus/timer.go:70
↓ 1 callers
Method
Query
(ctx context.Context, query string, ts time.Time, opts ...Option)
api/prometheus/v1/api.go:1091
↓ 1 callers
Method
QueryExemplars
(ctx context.Context, query string, startTime, endTime time.Time)
api/prometheus/v1/api.go:1317
↓ 1 callers
Method
QueryRange
(ctx context.Context, query string, r Range, opts ...Option)
api/prometheus/v1/api.go:1119
↓ 1 callers
Method
ReadFrom
(re io.Reader)
prometheus/promhttp/delegator.go:105
↓ 1 callers
Method
ReadFrom
(io.Reader)
prometheus/promhttp/instrument_server_test.go:473
↓ 1 callers
Method
ReallyExpensiveAssessmentOfTheSystemState
ReallyExpensiveAssessmentOfTheSystemState is a mock for the data gathering a real cluster manager would have to do. Since it may actually be really ex
prometheus/example_clustermanager_test.go:44
↓ 1 callers
Method
Register
(c Collector)
prometheus/wrap.go:87
↓ 1 callers
Method
Rules
(ctx context.Context)
api/prometheus/v1/api.go:1196
↓ 1 callers
Method
Runtimeinfo
(ctx context.Context)
api/prometheus/v1/api.go:1009
↓ 1 callers
Method
Series
Series finds series by label matchers.
api/prometheus/v1/api.go:492
↓ 1 callers
Method
Series
(ctx context.Context, matches []string, startTime, endTime time.Time)
api/prometheus/v1/api.go:1148
↓ 1 callers
Method
Set
(val float64)
prometheus/gauge.go:106
↓ 1 callers
Method
SetSeq1
Set the first sequence to be compared. The second sequence to be compared is not changed. SequenceMatcher computes and caches detailed information ab
prometheus/internal/difflib.go:131
↓ 1 callers
Method
SetSeq2
Set the second sequence to be compared. The first sequence to be compared is not changed.
prometheus/internal/difflib.go:142
↓ 1 callers
Method
Snapshot
(ctx context.Context, skipHead bool)
api/prometheus/v1/api.go:1173
↓ 1 callers
Method
String
()
prometheus/gen_go_collector_metrics_set.go:96
↓ 1 callers
Method
TSDB
(ctx context.Context)
api/prometheus/v1/api.go:1281
↓ 1 callers
Method
Targets
(ctx context.Context)
api/prometheus/v1/api.go:1214
↓ 1 callers
Method
TargetsMetadata
(ctx context.Context, matchTarget, metric, limit string)
api/prometheus/v1/api.go:1232
↓ 1 callers
Function
ToFloat64
ToFloat64 collects all Metrics from the provided Collector. It expects that this results in exactly one Metric being collected, which must be a Gauge,
prometheus/testutil/testutil.go:81
↓ 1 callers
Function
TransactionalGatherAndCompare
TransactionalGatherAndCompare gathers all metrics from the provided Gatherer and compares it to an expected output read from the provided Reader in th
prometheus/testutil/testutil.go:210
↓ 1 callers
Method
URL
(ep string, args map[string]string)
api/client.go:107
↓ 1 callers
Method
WalReplay
(ctx context.Context)
api/prometheus/v1/api.go:1299
↓ 1 callers
Method
With
With works as GetMetricWith but panics where GetMetricWithLabels would have returned an error. Not returning an error allows shortcuts like myVec.Wi
prometheus/histogram.go:1209
↓ 1 callers
Method
With
With works as GetMetricWith, but panics where GetMetricWithLabels would have returned an error. Not returning an error allows shortcuts like myVec.W
prometheus/summary.go:655
↓ 1 callers
Function
WithExtraMethods
WithExtraMethods adds additional HTTP methods to the list of allowed methods. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods for the de
prometheus/promhttp/option.go:63
↓ 1 callers
Method
WithLabelValues
(lvs ...string)
prometheus/example_metricvec_test.go:77
↓ 1 callers
Method
Write
(pb *dto.Metric)
prometheus/metric.go:172
↓ 1 callers
Method
WriteHeader
(int)
prometheus/promhttp/instrument_server_test.go:485
↓ 1 callers
Function
WriteToTextfile
WriteToTextfile calls Gather on the provided Gatherer, encodes the result in the Prometheus text format, and writes it to a temporary file. Upon succe
prometheus/registry.go:592
↓ 1 callers
Function
WriteUnifiedDiff
Compare two sequences of lines; generate the delta as a unified diff. Unified diffs are a compact way of showing line changes and a few lines of cont
prometheus/internal/difflib.go:566
↓ 1 callers
Method
Written
()
prometheus/promhttp/delegator.go:35
↓ 1 callers
Function
addAndReset
addAndReset returns a function to be used with sync.Map.Range of spare buckets in coldCounts. It increments the buckets in the provided hotBuckets acc
prometheus/histogram.go:1453
↓ 1 callers
Function
addExpectedRuntimeMemStats
(metrics map[string]struct{})
prometheus/go_collector_latest_test.go:63
↓ 1 callers
Function
addExpectedRuntimeMetrics
(metrics map[string]struct{})
prometheus/go_collector_latest_test.go:70
↓ 1 callers
Function
apiError
(code int)
api/prometheus/v1/api.go:1362
↓ 1 callers
Method
asyncFlush
asyncFlush needs bufMtx locked.
prometheus/summary.go:366
↓ 1 callers
Function
atomicDecUint32
atomicDecUint32 atomically decrements the uint32 p points to. See https://pkg.go.dev/sync/atomic#AddUint32 to understand how this is done.
prometheus/histogram.go:1558
↓ 1 callers
Function
benchmarkMetricVecWith
(b *testing.B, labels map[string]string)
prometheus/vec_test.go:958
↓ 1 callers
Function
canCollectProcess
()
prometheus/process_collector_js.go:19
↓ 1 callers
Method
chainB
()
prometheus/internal/difflib.go:153
↓ 1 callers
Function
checkDescConsistency
( metricFamily *dto.MetricFamily, dtoMetric *dto.Metric, desc *Desc, )
prometheus/registry.go:950
↓ 1 callers
Method
client
()
api/client.go:60
↓ 1 callers
Function
compare
compare encodes both provided slices of metric families into the text format, compares their string message, and returns an error if they do not match
prometheus/testutil/testutil.go:266
↓ 1 callers
Method
compile
()
prometheus/labels.go:57
↓ 1 callers
Function
computeApproximateRequestSize
(r *http.Request)
prometheus/promhttp/instrument_server.go:409
↓ 1 callers
Function
convertToExternal
(endpoint string)
tutorial/whatsup/internal/playground_test.go:87
↓ 1 callers
Function
decreaseCounter
(c *counter)
prometheus/counter_test.go:82
↓ 1 callers
Method
deleteByHashWithLabelValues
deleteByHashWithLabelValues removes the metric from the hash bucket h. If there are multiple matches in the bucket, use lvs to select a metric and rem
prometheus/vec.go:355
↓ 1 callers
Method
deleteByHashWithLabels
deleteByHashWithLabels removes the metric from the hash bucket h. If there are multiple matches in the bucket, use lvs to select a metric and remove o
prometheus/vec.go:384
↓ 1 callers
Method
deleteByLabels
deleteByLabels deletes a metric if the given labels are present in the metric.
prometheus/vec.go:410
↓ 1 callers
Function
diff
diff returns a diff of both values as long as both are of the same type and are a struct, map, slice, array or string. Otherwise it returns an empty s
prometheus/testutil/testutil.go:288
↓ 1 callers
Method
doubleBucketWidth
doubleBucketWidth doubles the bucket width (by decrementing the schema number). Note that very sparse buckets could lead to a low reduction of the buc
prometheus/histogram.go:1032
↓ 1 callers
Function
encodeComponent
encodeComponent encodes the provided string with base64.RawURLEncoding in case it contains '/' and as "=" in case it is empty. If neither is the case,
prometheus/push/push.go:348
↓ 1 callers
Function
errorTypeAndMsgFor
(resp *http.Response)
api/prometheus/v1/api.go:1367
↓ 1 callers
Method
exactSumFor
exactSumFor takes a runtime/metrics metric name (that is assumed to be of kind KindFloat64Histogram) and returns its exact sum and whether its exact s
prometheus/go_collector_latest.go:395
↓ 1 callers
Function
expectedBaseMetrics
()
prometheus/go_collector_latest_test.go:48
↓ 1 callers
Function
extractLabelValues
(desc *Desc, labels Labels, curry []curriedLabelValue)
prometheus/vec.go:630
↓ 1 callers
Function
fileTimeToSeconds
(ft windows.Filetime)
prometheus/process_collector_windows.go:114
↓ 1 callers
Method
findLongestMatch
Find longest matching block in a[alo:ahi] and b[blo:bhi]. If IsJunk is not defined: Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where
prometheus/internal/difflib.go:226
↓ 1 callers
Function
findMetricWithPartialLabels
findMetricWithPartialLabel returns the index of the matching metric or len(metrics) if not found.
prometheus/vec.go:431
↓ 1 callers
Function
findSmallestKey
(m *sync.Map)
prometheus/histogram.go:1471
↓ 1 callers
Function
formatRangeUnified
Convert range to the "ed" format
prometheus/internal/difflib.go:522
↓ 1 callers
Function
getExemplarFn
(ctx context.Context)
tutorial/whatsup/reference/main.go:221
↓ 1 callers
Function
getInterfaceIpv4Addr
(interfaceName string)
tutorial/whatsup/internal/common.go:56
↓ 1 callers
Method
getMetricWithHashAndLabelValues
getMetricWithHashAndLabelValues gets a metric while handling possible collisions in the hash space. Must be called while holding the read mutex.
prometheus/vec.go:537
↓ 1 callers
Method
getMetricWithHashAndLabels
getMetricWithHashAndLabels gets a metric while handling possible collisions in the hash space. Must be called while holding read mutex.
prometheus/vec.go:551
↓ 1 callers
Method
getOrCreateMetricWithLabelValues
getOrCreateMetricWithLabelValues retrieves the metric by hash and label value or creates it and returns the new one. This function holds the mutex.
prometheus/vec.go:489
↓ 1 callers
Method
getOrCreateMetricWithLabels
getOrCreateMetricWithLabelValues retrieves the metric by hash and label value or creates it and returns the new one. This function holds the mutex.
prometheus/vec.go:514
↓ 1 callers
Function
getPIDFn
()
prometheus/get_pid.go:21
↓ 1 callers
Function
getProcessHandleCount
(handle windows.Handle)
prometheus/process_collector_windows.go:68
← previous
next →
301–400 of 932, ranked by callers