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
↓ 1 callers
Method
chainB
()
prometheus/internal/difflib.go:154
↓ 1 callers
Function
checkDescConsistency
( metricFamily *dto.MetricFamily, dtoMetric *dto.Metric, desc *Desc, )
prometheus/registry.go:998
↓ 1 callers
Method
client
()
api/client.go:65
↓ 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:303
↓ 1 callers
Function
compareNativeExemplarValues
(t *testing.T, exps []*dto.Exemplar, values []float64)
prometheus/histogram_test.go:1469
↓ 1 callers
Method
compile
()
prometheus/labels.go:57
↓ 1 callers
Function
compressPayload
(tmpbuf *[]byte, enc Compression, inp []byte)
exp/api/remote/remote_api.go:321
↓ 1 callers
Function
computeApproximateRequestSize
(r *http.Request)
prometheus/promhttp/instrument_server.go:421
↓ 1 callers
Function
computeMetricsList
(descs []metrics.Description)
prometheus/collectors/gen_go_collector_set.go:141
↓ 1 callers
Function
contentTypeHeader
ContentTypeHeader returns content type header value for the given proto message or empty string for unknown proto message.
exp/api/remote/remote_headers.go:92
↓ 1 callers
Function
convertToExternal
(endpoint string)
tutorials/whatsup/internal/playground_test.go:87
↓ 1 callers
Function
decreaseCounter
(c *counter)
prometheus/counter_test.go:81
↓ 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:357
↓ 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:386
↓ 1 callers
Method
deleteByLabels
deleteByLabels deletes a metric if the given labels are present in the metric.
prometheus/vec.go:412
↓ 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:1091
↓ 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
Method
errorCollectFn
(ch chan<- Metric)
prometheus/process_collector.go:135
↓ 1 callers
Method
errorDescribeFn
(ch chan<- *Desc)
prometheus/process_collector.go:139
↓ 1 callers
Function
errorTypeAndMsgFor
(resp *http.Response)
api/prometheus/v1/api.go:1489
↓ 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:414
↓ 1 callers
Function
expectQuality
(s string)
internal/github.com/golang/gddo/httputil/header/header.go:117
↓ 1 callers
Function
expectTokenSlash
(s string)
internal/github.com/golang/gddo/httputil/header/header.go:106
↓ 1 callers
Function
expectedBaseMetrics
()
prometheus/go_collector_latest_test.go:50
↓ 1 callers
Function
extractLabelValues
(desc *Desc, labels Labels, curry []curriedLabelValue)
prometheus/vec.go:632
↓ 1 callers
Function
fileTimeToSeconds
(ft windows.Filetime)
prometheus/process_collector_windows.go:138
↓ 1 callers
Function
file_io_prometheus_write_v2_types_proto_init
()
exp/api/remote/genproto/v2/types.pb.go:1068
↓ 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:227
↓ 1 callers
Function
findMetricWithPartialLabels
findMetricWithPartialLabel returns the index of the matching metric or len(metrics) if not found.
prometheus/vec.go:433
↓ 1 callers
Function
findSmallestKey
(m *sync.Map)
prometheus/histogram.go:1579
↓ 1 callers
Function
formatRangeUnified
Convert range to the "ed" format
prometheus/internal/difflib.go:523
↓ 1 callers
Function
getExemplarFn
(ctx context.Context)
tutorials/whatsup/main.go:166
↓ 1 callers
Function
getExemplarFn
(ctx context.Context)
tutorials/whatsup/reference/main.go:221
↓ 1 callers
Function
getInterfaceIpv4Addr
(interfaceName string)
tutorials/whatsup/internal/common.go:56
↓ 1 callers
Function
getMemory
()
prometheus/process_collector_mem_cgo_darwin.go:24
↓ 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:539
↓ 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:553
↓ 1 callers
Function
getOpenFileCount
()
prometheus/process_collector_darwin.go:51
↓ 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:491
↓ 1 callers
Method
getOrCreateMetricWithLabels
getOrCreateMetricWithLabels retrieves the metric by hash and label value or creates it and returns the new one. This function holds the mutex.
prometheus/vec.go:516
↓ 1 callers
Function
getProcessHandleCount
(handle windows.Handle)
prometheus/process_collector_windows.go:72
↓ 1 callers
Function
getProcessMemoryInfo
(handle windows.Handle)
prometheus/process_collector_windows.go:58
↓ 1 callers
Function
getRuntimeNumThreads
getRuntimeNumThreads returns the number of open OS threads.
prometheus/num_threads.go:22
↓ 1 callers
Function
getSoftLimit
(which int)
prometheus/process_collector_darwin.go:41
↓ 1 callers
Function
groupMetrics
(metricsList []string)
prometheus/collectors/gen_go_collector_set.go:159
↓ 1 callers
Function
httpError
httpError removes any content-encoding header and then calls http.Error with the provided error and http.StatusInternalServerError. Error contents is
prometheus/promhttp/http.go:631
↓ 1 callers
Function
indexOf
indexOf searches the given slice of strings for the target string and returns the index or len(items) as well as a boolean whether the search succeede
prometheus/vec.go:446
↓ 1 callers
Function
inlineLabelValues
(lvs []string, curry []curriedLabelValue)
prometheus/vec.go:646
↓ 1 callers
Function
instrumentHandlerFunc
(tracer *tracing.Tracer, _ prometheus.Registerer, handlerName string, handler http.Handler)
tutorials/whatsup/main.go:173
↓ 1 callers
Function
instrumentHandlerFunc
(tracer *tracing.Tracer, reg prometheus.Registerer, handlerName string, handler http.Handler)
tutorials/whatsup/reference/main.go:228
↓ 1 callers
Function
instrumentRoundTripper
(_ prometheus.Registerer, clientName string, rt http.RoundTripper)
tutorials/whatsup/main.go:181
↓ 1 callers
Function
instrumentRoundTripper
(reg prometheus.Registerer, clientName string, rt http.RoundTripper)
tutorials/whatsup/reference/main.go:283
↓ 1 callers
Method
isBJunk
(s string)
prometheus/internal/difflib.go:195
↓ 1 callers
Function
isLabelCurried
(c prometheus.Collector, label string)
prometheus/promhttp/instrument_server.go:384
↓ 1 callers
Function
isWSL
()
tutorials/whatsup/internal/common.go:43
↓ 1 callers
Method
labelNames
()
prometheus/labels.go:58
↓ 1 callers
Method
limitBuckets
limitBuckets applies a strategy to limit the number of populated sparse buckets. It's generally best effort, and there are situations where the number
prometheus/histogram.go:923
↓ 1 callers
Method
lint
lint is the entry point for linting a single metric.
prometheus/testutil/promlint/promlint.go:102
↓ 1 callers
Function
makeBuckets
(buckets *sync.Map)
prometheus/histogram.go:1482
↓ 1 callers
Function
makeNativeExemplars
(ttl time.Duration, maxCount int)
prometheus/histogram.go:1701
↓ 1 callers
Function
marshalHistogram
marshalHistogram writes something like: { "count": "42", "sum": "34593.34", "buckets": [ [ 3, "-0.25", "0.25", "3"], [
api/prometheus/v1/api.go:329
↓ 1 callers
Function
marshalHistogramBucket
marshalHistogramBucket writes something like: [ 3, "-0.25", "0.25", "3"] See marshalHistogram to understand what the numbers mean
api/prometheus/v1/api.go:294
↓ 1 callers
Function
marshalSampleHistogramPairJSON
(ptr unsafe.Pointer, stream *json.Stream)
api/prometheus/v1/api.go:137
↓ 1 callers
Function
marshalSamplePairJSON
(ptr unsafe.Pointer, stream *json.Stream)
api/prometheus/v1/api.go:75
↓ 1 callers
Function
matchLabelValues
(values, lvs []string, curry []curriedLabelValue)
prometheus/vec.go:591
↓ 1 callers
Function
matchLabels
(desc *Desc, values []string, labels Labels, curry []curriedLabelValue)
prometheus/vec.go:612
↓ 1 callers
Function
matchPartialLabels
matchPartialLabels searches the current metric and returns whether all of the target label:value pairs are present.
prometheus/vec.go:470
↓ 1 callers
Function
matchRuntimeMetricsRules
(rules []internal.GoCollectorRule)
prometheus/go_collector_latest.go:126
↓ 1 callers
Function
maxInt
(a, b int)
prometheus/internal/difflib.go:36
↓ 1 callers
Method
maybeReset
maybeReset resets the whole histogram if at least h.nativeHistogramMinResetDuration has been passed. It returns true if the histogram has been reset.
prometheus/histogram.go:967
↓ 1 callers
Method
maybeRotateStreams
rotateStreams needs mtx AND bufMtx locked.
prometheus/summary.go:387
↓ 1 callers
Method
maybeWidenZeroBucket
maybeWidenZeroBucket widens the zero bucket until it includes the existing buckets closest to the zero bucket (which could be two, if an equidistant n
prometheus/histogram.go:1021
↓ 1 callers
Function
memstatNamespace
(s string)
prometheus/go_collector.go:264
↓ 1 callers
Function
metricUnits
metricUnits attempts to detect known unit types used as part of a metric name, e.g. "foo_bytes_total" or "bar_baz_milligrams".
prometheus/testutil/promlint/validations/units.go:100
↓ 1 callers
Function
newBatchHistogram
newBatchHistogram creates a new batch histogram value with the given Desc, buckets, and whether or not it has an exact sum available. buckets must al
prometheus/go_collector_latest.go:497
↓ 1 callers
Function
newMockGraphite
(port string)
prometheus/graphite/bridge_test.go:408
↓ 1 callers
Function
newNativeHistogramWithClassicBuckets
newNativeHistogramWithClassicBuckets returns a Metric representing a native histogram that also has classic buckets. This is for testing purposes.
prometheus/metric_test.go:299
↓ 1 callers
Function
newProblem
newProblem is helper function to create a Problem.
prometheus/testutil/promlint/problem.go:28
↓ 1 callers
Method
newStream
()
prometheus/summary.go:368
↓ 1 callers
Function
newThirdPartyLibFoo
(reg prometheus.Registerer)
prometheus/examples_test.go:864
↓ 1 callers
Function
parseWriteResponseStats
parseWriteResponseStats returns WriteResponseStats parsed from the response headers. As per 2.0 spec, missing header means 0. However, abrupt HTTP er
exp/api/remote/remote_headers.go:197
↓ 1 callers
Function
performBackup
()
prometheus/push/example_add_from_gatherer_test.go:43
↓ 1 callers
Function
pickSchema
pickSchema returns the largest number n between -4 and 8 such that 2^(2^-n) is less or equal the provided bucketFactor. Special cases: - bucketFactor
prometheus/histogram.go:1467
↓ 1 callers
Function
processMetric
processMetric is an internal helper method only used by the Gather method.
prometheus/registry.go:664
↓ 1 callers
Function
prometheusConfig
(jobToScrapeTargetAddress map[string]string)
tutorials/whatsup/internal/playground_test.go:96
↓ 1 callers
Function
reBucketExp
reBucketExp takes a list of bucket boundaries (lower bound inclusive) and downsamples the buckets to those a multiple of base apart. The end result is
prometheus/internal/go_runtime_metrics.go:111
↓ 1 callers
Function
readCompressedBody
(r io.Reader, comp Compression)
prometheus/promhttp/http_test.go:86
↓ 1 callers
Method
releaseFunc
releaseFunc returns the done callback for one caller sharing cy. When the last caller releases, the underlying done is invoked and the cycle is cleare
prometheus/promhttp/http.go:174
↓ 1 callers
Function
requireEqual
(t testing.TB, expected, got any)
exp/api/remote/genproto/v2/symbols_test.go:39
↓ 1 callers
Function
rm2prom
(d metrics.Description)
prometheus/collectors/gen_go_collector_set.go:151
↓ 1 callers
Function
rmCardinality
()
prometheus/gen_go_collector_metrics_set.go:117
↓ 1 callers
Function
run
()
prometheus/example_timer_gauge_test.go:32
↓ 1 callers
Function
runMain
(opts internal.Config)
tutorials/whatsup/main.go:54
↓ 1 callers
Function
runMain
(opts internal.Config)
tutorials/whatsup/reference/main.go:57
↓ 1 callers
Function
safeCollect
Helper wrapper around Collector.Collect. It tries to collect from the channel, recovers on panic and if it has recovered from a panic, then it sends a
prometheus/registry.go:602
↓ 1 callers
Function
sanitizeCode
If the wrapped http.Handler has not set a status code, i.e. the value is currently 0, sanitizeCode will return 200, for consistency with behavior in t
prometheus/promhttp/instrument_server.go:485
↓ 1 callers
Function
sanitizeMethod
If the wrapped http.Handler has a known method, it will be sanitized and returned. Otherwise, "unknown" will be returned. The known method list can be
prometheus/promhttp/instrument_server.go:448
↓ 1 callers
Function
skipSpace
(s string)
internal/github.com/golang/gddo/httputil/header/header.go:96
↓ 1 callers
Function
startFireKeeper
(reg prometheus.Registerer)
examples/customlabels/main.go:54
↓ 1 callers
Function
startSparkForge
(reg prometheus.Registerer)
examples/customlabels/main.go:82
← previous
next →
501–600 of 1,308, ranked by callers