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
Function
getProcessMemoryInfo
(handle windows.Handle)
prometheus/process_collector_windows.go:54
↓ 1 callers
Function
getRuntimeNumThreads
getRuntimeNumThreads returns the number of open OS threads.
prometheus/num_threads.go:22
↓ 1 callers
Function
gzipAccepted
gzipAccepted returns whether the client will accept gzip-encoded content.
prometheus/promhttp/http.go:385
↓ 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:401
↓ 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:444
↓ 1 callers
Function
inlineLabelValues
(lvs []string, curry []curriedLabelValue)
prometheus/vec.go:644
↓ 1 callers
Function
instrumentHandlerFunc
(tracer *tracing.Tracer, _ prometheus.Registerer, handlerName string, handler http.Handler)
tutorial/whatsup/main.go:173
↓ 1 callers
Function
instrumentHandlerFunc
(tracer *tracing.Tracer, reg prometheus.Registerer, handlerName string, handler http.Handler)
tutorial/whatsup/reference/main.go:228
↓ 1 callers
Function
instrumentRoundTripper
(_ prometheus.Registerer, clientName string, rt http.RoundTripper)
tutorial/whatsup/main.go:181
↓ 1 callers
Function
instrumentRoundTripper
(reg prometheus.Registerer, clientName string, rt http.RoundTripper)
tutorial/whatsup/reference/main.go:283
↓ 1 callers
Method
isBJunk
(s string)
prometheus/internal/difflib.go:194
↓ 1 callers
Function
isLabelCurried
(c prometheus.Collector, label string)
prometheus/promhttp/instrument_server.go:372
↓ 1 callers
Function
isWSL
()
tutorial/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:864
↓ 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:1374
↓ 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:589
↓ 1 callers
Function
matchLabels
(desc *Desc, values []string, labels Labels, curry []curriedLabelValue)
prometheus/vec.go:610
↓ 1 callers
Function
matchPartialLabels
matchPartialLabels searches the current metric and returns whether all of the target label:value pairs are present.
prometheus/vec.go:468
↓ 1 callers
Function
matchRuntimeMetricsRules
(rules []internal.GoCollectorRule)
prometheus/go_collector_latest.go:125
↓ 1 callers
Function
max
(a, b int)
prometheus/internal/difflib.go:35
↓ 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:908
↓ 1 callers
Method
maybeRotateStreams
rotateStreams needs mtx AND bufMtx locked.
prometheus/summary.go:380
↓ 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:962
↓ 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
Method
msCollect
(ch chan<- Metric, ms *runtime.MemStats)
prometheus/go_collector_go116.go:118
↓ 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:478
↓ 1 callers
Function
newMockGraphite
(port string)
prometheus/graphite/bridge_test.go:407
↓ 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:361
↓ 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:1359
↓ 1 callers
Function
processMetric
processMetric is an internal helper method only used by the Gather method.
prometheus/registry.go:619
↓ 1 callers
Function
prometheusConfig
(jobToScrapeTargetAddress map[string]string)
tutorial/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:110
↓ 1 callers
Function
replaceInvalidRune
(c rune)
prometheus/graphite/bridge.go:306
↓ 1 callers
Function
rmCardinality
()
prometheus/gen_go_collector_metrics_set.go:104
↓ 1 callers
Function
run
()
prometheus/example_timer_gauge_test.go:32
↓ 1 callers
Function
runMain
(opts internal.Config)
tutorial/whatsup/main.go:54
↓ 1 callers
Function
runMain
(opts internal.Config)
tutorial/whatsup/reference/main.go:57
↓ 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:473
↓ 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:436
↓ 1 callers
Function
stringToLines
(s string)
prometheus/graphite/bridge_test.go:338
↓ 1 callers
Function
testConstrainedCurryVec
(t *testing.T, vec *CounterVec, constraint func(string) string)
prometheus/vec_test.go:702
↓ 1 callers
Function
testConstrainedMetricVec
(t *testing.T, vec *GaugeVec, constrain func(string) string)
prometheus/vec_test.go:358
↓ 1 callers
Function
testToReader
(t *testing.T, useTags bool)
prometheus/graphite/bridge_test.go:250
↓ 1 callers
Function
testWriteHistogram
(t *testing.T, useTags bool)
prometheus/graphite/bridge_test.go:168
↓ 1 callers
Function
testWriteSummary
(t *testing.T, useTags bool)
prometheus/graphite/bridge_test.go:72
↓ 1 callers
Function
toMetricFamilies
(cs ...Collector)
prometheus/wrap_test.go:36
↓ 1 callers
Function
typeAndKind
typeAndKind returns the type and kind of the given interface{}
prometheus/testutil/testutil.go:336
↓ 1 callers
Function
unmarshalHistogramBucket
(iter *json.Iterator)
api/prometheus/v1/api.go:252
↓ 1 callers
Function
unmarshalSampleHistogramPairJSON
(ptr unsafe.Pointer, iter *json.Iterator)
api/prometheus/v1/api.go:84
↓ 1 callers
Function
unmarshalSamplePairJSON
(ptr unsafe.Pointer, iter *json.Iterator)
api/prometheus/v1/api.go:46
↓ 1 callers
Method
unwrapRecursively
()
prometheus/wrap.go:152
↓ 1 callers
Method
update
update updates the batchHistogram from a runtime/metrics histogram. sum must be provided if the batchHistogram was created to have an exact sum. h.bu
prometheus/go_collector_latest.go:502
↓ 1 callers
Method
updateExemplar
(v float64, l Labels)
prometheus/counter.go:172
↓ 1 callers
Method
updateExemplar
updateExemplar replaces the exemplar for the provided bucket. With empty labels, it's a no-op. It panics if any of the labels is invalid.
prometheus/histogram.go:1096
↓ 1 callers
Method
validate
()
api/client.go:69
↓ 1 callers
Function
validateValuesInLabels
(labels Labels, expectedNumberOfValues int)
prometheus/labels.go:148
↓ 1 callers
Function
valueMatchesVariableOrCurriedValue
valueMatchesVariableOrCurriedValue determines if a value was previously curried, and returns whether it matches either the "base" value or the curried
prometheus/vec.go:456
↓ 1 callers
Function
whatsUpHandler
whatsUpHandler returns all services that currently monitored by Prometheus. It uses prometheus client_golang client code to request PromQL query again
tutorial/whatsup/main.go:124
↓ 1 callers
Function
whatsUpHandler
whatsUpHandler returns all services that currently monitored by Prometheus. It uses prometheus client_golang client code to request PromQL query again
tutorial/whatsup/reference/main.go:169
↓ 1 callers
Function
withAllMetrics
()
prometheus/collectors/go_collector_go121_test.go:19
↓ 1 callers
Function
withGCMetrics
()
prometheus/collectors/go_collector_go121_test.go:94
↓ 1 callers
Function
withMemoryMetrics
()
prometheus/collectors/go_collector_go121_test.go:121
↓ 1 callers
Function
withSchedulerMetrics
()
prometheus/collectors/go_collector_go121_test.go:140
↓ 1 callers
Function
writeLabels
(buf *bufio.Writer, m model.Metric, numLabels int)
prometheus/graphite/bridge.go:265
↓ 1 callers
Function
writeMetric
(buf *bufio.Writer, m model.Metric, useTags bool)
prometheus/graphite/bridge.go:224
↓ 1 callers
Function
writeTags
(buf *bufio.Writer, m model.Metric)
prometheus/graphite/bridge.go:249
Method
Add
Add works like push, but only previously pushed metrics with the same name (and the same job and other grouping labels) will be replaced. (It uses HTT
prometheus/push/push.go:139
Method
AddContext
AddContext is like Add but includes a context. If the context expires before HTTP request is complete, an error is returned.
prometheus/push/push.go:146
Method
AddWithExemplar
(v float64, e Labels)
prometheus/counter.go:146
Method
AlertManagers
AlertManagers returns an overview of the current state of the Prometheus alert manager discovery.
api/prometheus/v1/api.go:468
Method
Alerts
Alerts returns a list of all active alerts.
api/prometheus/v1/api.go:466
Method
Alerts
(ctx context.Context)
api/prometheus/v1/api.go:881
Method
BasicAuth
BasicAuth configures the Pusher to use HTTP Basic Authentication with the provided username and password. For convenience, this method returns a point
prometheus/push/push.go:215
Function
BenchmarkClient
(b *testing.B)
api/client_test.go:131
Function
BenchmarkCounter
(b *testing.B)
prometheus/benchmark_test.go:21
Function
BenchmarkCounterNoLabels
(b *testing.B)
prometheus/benchmark_test.go:135
Function
BenchmarkCounterWithLabelValuesConcurrent
(b *testing.B)
prometheus/benchmark_test.go:112
Function
BenchmarkGaugeNoLabels
(b *testing.B)
prometheus/benchmark_test.go:162
Function
BenchmarkGaugeWithLabelValues
(b *testing.B)
prometheus/benchmark_test.go:147
Function
BenchmarkGoCollector
(b *testing.B)
prometheus/go_collector_test.go:158
Function
BenchmarkHandler
(b *testing.B)
prometheus/registry_test.go:748
Function
BenchmarkHistogramNoLabels
(b *testing.B)
prometheus/benchmark_test.go:219
Function
BenchmarkHistogramObserve1
(b *testing.B)
prometheus/histogram_test.go:63
Function
BenchmarkHistogramObserve2
(b *testing.B)
prometheus/histogram_test.go:67
Function
BenchmarkHistogramObserve4
(b *testing.B)
prometheus/histogram_test.go:71
Function
BenchmarkHistogramObserve8
(b *testing.B)
prometheus/histogram_test.go:75
Function
BenchmarkHistogramWithLabelValues
(b *testing.B)
prometheus/benchmark_test.go:204
Function
BenchmarkHistogramWrite1
(b *testing.B)
prometheus/histogram_test.go:113
Function
BenchmarkHistogramWrite2
(b *testing.B)
prometheus/histogram_test.go:117
Function
BenchmarkHistogramWrite4
(b *testing.B)
prometheus/histogram_test.go:121
Function
BenchmarkHistogramWrite8
(b *testing.B)
prometheus/histogram_test.go:125
Function
BenchmarkMetricVecWithBasic
(b *testing.B)
prometheus/vec_test.go:907
← previous
next →
401–500 of 932, ranked by callers