MCPcopy Create free account

hub / github.com/prometheus/client_golang / functions

Functions932 in github.com/prometheus/client_golang

↓ 1 callersMethodGetMetricWithLabelValues
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 callersFunctionInstrumentHandlerTimeToWriteHeader
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 callersMethodLabelNames
(ctx context.Context, matches []string, startTime, endTime time.Time)
api/prometheus/v1/api.go:1027
↓ 1 callersMethodLabelValues
(ctx context.Context, label string, matches []string, startTime, endTime time.Time)
api/prometheus/v1/api.go:1049
↓ 1 callersMethodMetadata
(ctx context.Context, metric, limit string)
api/prometheus/v1/api.go:1257
↓ 1 callersMethodMustCurryWith
MustCurryWith works as CurryWith but panics where CurryWith would have returned an error.
prometheus/counter.go:324
↓ 1 callersFunctionMustNewConstMetricWithCreatedTimestamp
MustNewConstMetricWithCreatedTimestamp is a version of NewConstMetricWithCreatedTimestamp that panics where NewConstMetricWithCreatedTimestamp would h
prometheus/value.go:163
↓ 1 callersFunctionMustNewMetricWithExemplars
MustNewMetricWithExemplars is a version of NewMetricWithExemplars that panics where NewMetricWithExemplars would have returned an error.
prometheus/metric.go:251
↓ 1 callersFunctionNewBuildInfoCollector
NewBuildInfoCollector is the obsolete version of collectors.NewBuildInfoCollector. See there for documentation. Deprecated: Use collectors.NewBuildIn
prometheus/build_info_collector.go:22
↓ 1 callersFunctionNewClusterManager
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 callersFunctionNewConstHistogram
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 callersFunctionNewConstSummary
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 callersFunctionNewCounterFunc
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 callersMethodNewCounterFunc
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 callersFunctionNewDBStatsCollector
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 callersMethodNewGaugeVec
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 callersFunctionNewInfoVec
(name, help string, labelNames []string)
prometheus/example_metricvec_test.go:55
↓ 1 callersFunctionNewInvalidDesc
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 callersFunctionNewMatcherWithJunk
(a, b []string, autoJunk bool, isJunk func(string) bool, )
prometheus/internal/difflib.go:108
↓ 1 callersFunctionNewMetricWithExemplars
NewMetricWithExemplars returns a new Metric wrapping the provided Metric with given exemplars. Exemplars are validated. Only last applicable exemplar
prometheus/metric.go:225
↓ 1 callersFunctionNewMetrics
(reg prometheus.Registerer, normMean, normDomain float64)
examples/random/main.go:38
↓ 1 callersFunctionNewMultiTRegistry
NewMultiTRegistry creates MultiTRegistry.
prometheus/registry.go:1003
↓ 1 callersFunctionNewPidFileFn
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 callersMethodNewSummary
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 callersMethodNewSummaryVec
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 callersFunctionNewUntypedFunc
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 callersMethodNewUntypedFunc
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 callersFunctionNewWithMetricFamilies
NewWithMetricFamilies creates a new Linter that reads from a slice of MetricFamily protobuf messages.
prometheus/testutil/promlint/promlint.go:50
↓ 1 callersMethodObserveDurationWithExemplar
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 callersMethodQuery
(ctx context.Context, query string, ts time.Time, opts ...Option)
api/prometheus/v1/api.go:1091
↓ 1 callersMethodQueryExemplars
(ctx context.Context, query string, startTime, endTime time.Time)
api/prometheus/v1/api.go:1317
↓ 1 callersMethodQueryRange
(ctx context.Context, query string, r Range, opts ...Option)
api/prometheus/v1/api.go:1119
↓ 1 callersMethodReadFrom
(re io.Reader)
prometheus/promhttp/delegator.go:105
↓ 1 callersMethodReadFrom
(io.Reader)
prometheus/promhttp/instrument_server_test.go:473
↓ 1 callersMethodReallyExpensiveAssessmentOfTheSystemState
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 callersMethodRegister
(c Collector)
prometheus/wrap.go:87
↓ 1 callersMethodRules
(ctx context.Context)
api/prometheus/v1/api.go:1196
↓ 1 callersMethodRuntimeinfo
(ctx context.Context)
api/prometheus/v1/api.go:1009
↓ 1 callersMethodSeries
Series finds series by label matchers.
api/prometheus/v1/api.go:492
↓ 1 callersMethodSeries
(ctx context.Context, matches []string, startTime, endTime time.Time)
api/prometheus/v1/api.go:1148
↓ 1 callersMethodSet
(val float64)
prometheus/gauge.go:106
↓ 1 callersMethodSetSeq1
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 callersMethodSetSeq2
Set the second sequence to be compared. The first sequence to be compared is not changed.
prometheus/internal/difflib.go:142
↓ 1 callersMethodSnapshot
(ctx context.Context, skipHead bool)
api/prometheus/v1/api.go:1173
↓ 1 callersMethodString
()
prometheus/gen_go_collector_metrics_set.go:96
↓ 1 callersMethodTSDB
(ctx context.Context)
api/prometheus/v1/api.go:1281
↓ 1 callersMethodTargets
(ctx context.Context)
api/prometheus/v1/api.go:1214
↓ 1 callersMethodTargetsMetadata
(ctx context.Context, matchTarget, metric, limit string)
api/prometheus/v1/api.go:1232
↓ 1 callersFunctionToFloat64
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 callersFunctionTransactionalGatherAndCompare
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 callersMethodURL
(ep string, args map[string]string)
api/client.go:107
↓ 1 callersMethodWalReplay
(ctx context.Context)
api/prometheus/v1/api.go:1299
↓ 1 callersMethodWith
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 callersMethodWith
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 callersFunctionWithExtraMethods
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 callersMethodWithLabelValues
(lvs ...string)
prometheus/example_metricvec_test.go:77
↓ 1 callersMethodWrite
(pb *dto.Metric)
prometheus/metric.go:172
↓ 1 callersMethodWriteHeader
(int)
prometheus/promhttp/instrument_server_test.go:485
↓ 1 callersFunctionWriteToTextfile
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 callersFunctionWriteUnifiedDiff
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 callersMethodWritten
()
prometheus/promhttp/delegator.go:35
↓ 1 callersFunctionaddAndReset
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 callersFunctionaddExpectedRuntimeMemStats
(metrics map[string]struct{})
prometheus/go_collector_latest_test.go:63
↓ 1 callersFunctionaddExpectedRuntimeMetrics
(metrics map[string]struct{})
prometheus/go_collector_latest_test.go:70
↓ 1 callersFunctionapiError
(code int)
api/prometheus/v1/api.go:1362
↓ 1 callersMethodasyncFlush
asyncFlush needs bufMtx locked.
prometheus/summary.go:366
↓ 1 callersFunctionatomicDecUint32
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 callersFunctionbenchmarkMetricVecWith
(b *testing.B, labels map[string]string)
prometheus/vec_test.go:958
↓ 1 callersFunctioncanCollectProcess
()
prometheus/process_collector_js.go:19
↓ 1 callersMethodchainB
()
prometheus/internal/difflib.go:153
↓ 1 callersFunctioncheckDescConsistency
( metricFamily *dto.MetricFamily, dtoMetric *dto.Metric, desc *Desc, )
prometheus/registry.go:950
↓ 1 callersMethodclient
()
api/client.go:60
↓ 1 callersFunctioncompare
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 callersMethodcompile
()
prometheus/labels.go:57
↓ 1 callersFunctioncomputeApproximateRequestSize
(r *http.Request)
prometheus/promhttp/instrument_server.go:409
↓ 1 callersFunctionconvertToExternal
(endpoint string)
tutorial/whatsup/internal/playground_test.go:87
↓ 1 callersFunctiondecreaseCounter
(c *counter)
prometheus/counter_test.go:82
↓ 1 callersMethoddeleteByHashWithLabelValues
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 callersMethoddeleteByHashWithLabels
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 callersMethoddeleteByLabels
deleteByLabels deletes a metric if the given labels are present in the metric.
prometheus/vec.go:410
↓ 1 callersFunctiondiff
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 callersMethoddoubleBucketWidth
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 callersFunctionencodeComponent
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 callersFunctionerrorTypeAndMsgFor
(resp *http.Response)
api/prometheus/v1/api.go:1367
↓ 1 callersMethodexactSumFor
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 callersFunctionexpectedBaseMetrics
()
prometheus/go_collector_latest_test.go:48
↓ 1 callersFunctionextractLabelValues
(desc *Desc, labels Labels, curry []curriedLabelValue)
prometheus/vec.go:630
↓ 1 callersFunctionfileTimeToSeconds
(ft windows.Filetime)
prometheus/process_collector_windows.go:114
↓ 1 callersMethodfindLongestMatch
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 callersFunctionfindMetricWithPartialLabels
findMetricWithPartialLabel returns the index of the matching metric or len(metrics) if not found.
prometheus/vec.go:431
↓ 1 callersFunctionfindSmallestKey
(m *sync.Map)
prometheus/histogram.go:1471
↓ 1 callersFunctionformatRangeUnified
Convert range to the "ed" format
prometheus/internal/difflib.go:522
↓ 1 callersFunctiongetExemplarFn
(ctx context.Context)
tutorial/whatsup/reference/main.go:221
↓ 1 callersFunctiongetInterfaceIpv4Addr
(interfaceName string)
tutorial/whatsup/internal/common.go:56
↓ 1 callersMethodgetMetricWithHashAndLabelValues
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 callersMethodgetMetricWithHashAndLabels
getMetricWithHashAndLabels gets a metric while handling possible collisions in the hash space. Must be called while holding read mutex.
prometheus/vec.go:551
↓ 1 callersMethodgetOrCreateMetricWithLabelValues
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 callersMethodgetOrCreateMetricWithLabels
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 callersFunctiongetPIDFn
()
prometheus/get_pid.go:21
↓ 1 callersFunctiongetProcessHandleCount
(handle windows.Handle)
prometheus/process_collector_windows.go:68
← previousnext →301–400 of 932, ranked by callers