MCPcopy Create free account

hub / github.com/prometheus/client_golang / functions

Functions1,308 in github.com/prometheus/client_golang

↓ 6 callersFunctionNewProcessCollector
NewProcessCollector is the obsolete version of collectors.NewProcessCollector. See there for documentation. Deprecated: Use collectors.NewProcessColl
prometheus/process_collector.go:62
↓ 6 callersFunctionNewProcessCollector
NewProcessCollector returns a collector which exports the current state of process metrics including CPU, memory and file descriptor usage as well as
prometheus/collectors/process_collector.go:49
↓ 6 callersFunctionWithGoCollectorRuntimeMetrics
WithGoCollectorRuntimeMetrics allows enabling and configuring particular group of runtime/metrics. See the list of metrics https://pkg.go.dev/runtime/
prometheus/collectors/go_collector_latest.go:102
↓ 6 callersFunctionaddOptionalURLParams
(q url.Values, opts []Option)
api/prometheus/v1/api.go:1170
↓ 6 callersMethodfindBucket
findBucket returns the index of the bucket for the provided value, or len(h.upperBounds) for the +Inf bucket.
prometheus/histogram.go:870
↓ 6 callersFunctionobserveWithExemplar
observeWithExemplar records val on obs. If labels is non-nil and obs implements [prometheus.ExemplarObserver], the exemplar is attached via ObserveWit
prometheus/promhttp/instrument_server.go:38
↓ 5 callersMethodAdd
Add adds the given value to the counter. It panics if the value is < 0.
prometheus/counter.go:44
↓ 5 callersFunctionExponentialBuckets
ExponentialBuckets creates 'count' regular buckets, where the lowest bucket has an upper bound of 'start' and each following bucket's upper bound is '
prometheus/histogram.go:315
↓ 5 callersFunctionHandler
Handler returns an http.Handler for the prometheus.DefaultGatherer, using default HandlerOpts, i.e. it reports the first error as an HTTP error, it ha
prometheus/promhttp/http.go:209
↓ 5 callersMethodHeader
()
prometheus/promhttp/delegator_test.go:28
↓ 5 callersMethodNewCounter
NewCounter works like the function of the same name in the prometheus package but it automatically registers the Counter with the Factory's Registerer
prometheus/promauto/auto.go:262
↓ 5 callersFunctionNewGaugeFunc
NewGaugeFunc creates a new GaugeFunc based on the provided GaugeOpts. The value reported is determined by calling the given function from within the W
prometheus/gauge.go:306
↓ 5 callersMethodNewGaugeVec
NewGaugeVec creates a new GaugeVec based on the provided GaugeVecOpts.
prometheus/gauge.go:161
↓ 5 callersFunctionNewMetricVec
NewMetricVec returns an initialized metricVec.
prometheus/vec.go:47
↓ 5 callersMethodQueryRange
QueryRange performs a query for the given range.
api/prometheus/v1/api.go:486
↓ 5 callersFunctionRuntimeMetricsToProm
RuntimeMetricsToProm produces a Prometheus metric name from a runtime/metrics metric description and validates whether the metric is suitable for inte
prometheus/internal/go_runtime_metrics.go:39
↓ 5 callersFunctionWithExemplarFromContext
WithExemplarFromContext allows you to inject a function that will get exemplar from context that will be put to counter and histogram metrics. If the
prometheus/promhttp/option.go:85
↓ 5 callersFunctionWithGoCollectorMemStatsMetricsDisabled
WithGoCollectorMemStatsMetricsDisabled disables metrics that is gathered in runtime.MemStats structure such as: go_memstats_alloc_bytes go_memstats_a
prometheus/collectors/go_collector_latest.go:84
↓ 5 callersMethodWithLabelValues
WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allo
prometheus/summary.go:651
↓ 5 callersMethodWithLabelValues
WithLabelValues works as GetMetricWithLabelValues, but panics where GetMetricWithLabelValues would have returned an error. Not returning an error allo
prometheus/gauge.go:237
↓ 5 callersFunctionbenchmarkMetricVecWithLabelValuesCardinality
(b *testing.B, nkeys, nvalues int)
prometheus/vec_test.go:942
↓ 5 callersFunctionpopulateMetric
( t ValueType, v float64, labelPairs []*dto.LabelPair, e *dto.Exemplar, m *dto.Metric, ct *timestamppb.T
prometheus/value.go:188
↓ 5 callersFunctionsplitChars
(s string)
prometheus/internal/difflib_test.go:36
↓ 5 callersFunctionwaitForCooldown
waitForCooldown returns after the count field in the provided histogramCounts has reached the provided count value.
prometheus/histogram.go:1646
↓ 4 callersMethodDo
(*http.Request)
prometheus/push/push.go:65
↓ 4 callersMethodGetOpCodes
Return list of 5-tuples describing how to turn a into b. Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple has i1 == j1 == 0, and rem
prometheus/internal/difflib.go:379
↓ 4 callersMethodGetZeroCount
()
exp/api/remote/genproto/v2/types.pb.go:718
↓ 4 callersFunctionInstrumentHandlerResponseSize
InstrumentHandlerResponseSize is a middleware that wraps the provided http.Handler to observe the response size with the provided ObserverVec. The Obs
prometheus/promhttp/instrument_server.go:297
↓ 4 callersFunctionLinearBuckets
LinearBuckets creates 'count' regular buckets, each 'width' wide, where the lowest bucket has an upper bound of 'start'. The final +Inf bucket is not
prometheus/histogram.go:295
↓ 4 callersMethodLint
Lint performs a linting pass, returning a slice of Problems indicating any issues found in the metrics stream. The slice is sorted by metric name and
prometheus/testutil/promlint/promlint.go:67
↓ 4 callersMethodMarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/remote_api.go:192
↓ 4 callersMethodNewGauge
NewGauge works like the function of the same name in the prometheus package but it automatically registers the Gauge with the Factory's Registerer.
prometheus/promauto/auto.go:294
↓ 4 callersMethodNewHistogramVec
NewHistogramVec creates a new HistogramVec based on the provided HistogramVecOpts.
prometheus/histogram.go:1191
↓ 4 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:196
↓ 4 callersFunctionNewInvalidMetric
NewInvalidMetric returns a metric whose Write method always returns the provided error. It is useful if a Collector finds itself unable to collect a m
prometheus/metric.go:141
↓ 4 callersFunctionNewWriteResponse
NewWriteResponse creates a new WriteResponse with empty stats and status code http.StatusNoContent.
exp/api/remote/remote_headers.go:110
↓ 4 callersMethodRatio
Return a measure of the sequences' similarity (float in [0,1]). Where T is the total number of elements in both sequences, and M is the number of mat
prometheus/internal/difflib.go:473
↓ 4 callersFunctionRegister
Register registers the provided Collector with the DefaultRegisterer. Register is a shortcut for DefaultRegisterer.Register(c). See there for more de
prometheus/registry.go:167
↓ 4 callersMethodRoundTrip
RoundTrip implements the RoundTripper interface.
prometheus/promhttp/instrument_client.go:31
↓ 4 callersFunctionScrapeAndCompare
ScrapeAndCompare calls a remote exporter's endpoint which is expected to return some metrics in plain text format. Then it compares it with the result
prometheus/testutil/testutil.go:166
↓ 4 callersMethodSizeVT
()
exp/api/remote/remote_api.go:191
↓ 4 callersMethodStatus
()
prometheus/promhttp/delegator.go:34
↓ 4 callersMethodUnregister
Unregister implements Registerer.
prometheus/registry.go:379
↓ 4 callersFunctionaddToBucket
addToBucket increments the sparse bucket at key by the provided amount. It returns true if a new sparse bucket had to be created for that.
prometheus/histogram.go:1539
↓ 4 callersFunctionassetMetricAndExemplars
( t *testing.T, reg *prometheus.Registry, expectedNumMetrics int, expectedExemplar []*dto.LabelPair, )
prometheus/promhttp/instrument_client_test.go:118
↓ 4 callersFunctionbenchmarkFindBucket
(b *testing.B, l int)
prometheus/histogram_test.go:1482
↓ 4 callersFunctionbenchmarkHistogramObserve
(w int, b *testing.B)
prometheus/histogram_test.go:35
↓ 4 callersFunctionbenchmarkHistogramWrite
(w int, b *testing.B)
prometheus/histogram_test.go:79
↓ 4 callersFunctionbenchmarkSummaryObserve
(w int, b *testing.B)
prometheus/summary_test.go:107
↓ 4 callersFunctionbenchmarkSummaryWrite
(w int, b *testing.B)
prometheus/summary_test.go:151
↓ 4 callersFunctioncollectGoMetrics
(t *testing.T, opts internal.GoCollectorOptions)
prometheus/go_collector_latest_test.go:235
↓ 4 callersFunctionfilterMetrics
(metrics []*dto.MetricFamily, names []string)
prometheus/testutil/testutil.go:323
↓ 4 callersFunctiongetPIDFn
()
prometheus/get_pid.go:21
↓ 4 callersFunctionmakeInconsistentCardinalityError
(fqName string, labels, labelValues []string)
prometheus/labels.go:139
↓ 4 callersFunctionmakeInstrumentedClient
(opts ...Option)
prometheus/promhttp/instrument_client_test.go:34
↓ 4 callersMethodprocessCollect
(ch chan<- Metric)
prometheus/process_collector_darwin.go:74
↓ 4 callersMethodpush
(ctx context.Context, method string)
prometheus/push/push.go:265
↓ 4 callersMethodreportError
(ch chan<- Metric, desc *Desc, err error)
prometheus/process_collector.go:155
↓ 4 callersFunctionsanitizeMetricFamily
sanitizeMetricFamily is like sanitizeMetric, but for multiple metrics.
prometheus/utils_test.go:43
↓ 4 callersFunctionwriteMetrics
(w io.Writer, mfs []*dto.MetricFamily, useTags bool, prefix string, now model.Time)
prometheus/graphite/bridge.go:190
↓ 3 callersMethodAdd
(val float64)
prometheus/gauge.go:123
↓ 3 callersMethodAddWithExemplar
(value float64, exemplar Labels)
prometheus/counter.go:57
↓ 3 callersMethodAppend
Append appends the provided error if it is not nil.
prometheus/registry.go:245
↓ 3 callersMethodCollector
Collector adds a Collector to the Pusher, from which metrics will be collected to push them to the Pushgateway. The collected metrics must not contain
prometheus/push/push.go:165
↓ 3 callersMethodDec
Dec decrements the Gauge by 1. Use Sub to decrement it by arbitrary values.
prometheus/gauge.go:43
↓ 3 callersFunctionDescribeByCollect
DescribeByCollect is a helper to implement the Describe method of a custom Collector. It collects the metrics from the provided Collector and sends th
prometheus/collector.go:87
↓ 3 callersMethodGetGroupedOpCodes
Isolate change clusters by eliminating ranges with no changes. Return a generator of groups with up to n lines of context. Each group is in the same
prometheus/internal/difflib.go:419
↓ 3 callersMethodGetMetricWithLabelValues
GetMetricWithLabelValues returns the Counter for the given slice of label values (same order as the variable labels in Desc). If that combination of l
prometheus/counter.go:250
↓ 3 callersFunctionInstrumentHandlerInFlight
InstrumentHandlerInFlight is a middleware that wraps the provided http.Handler. It sets the provided prometheus.Gauge to the number of requests curren
prometheus/promhttp/instrument_server.go:68
↓ 3 callersFunctionInstrumentMetricHandler
InstrumentMetricHandler is usually used with an http.Handler returned by the HandlerFor function. It instruments the provided http.Handler with two me
prometheus/promhttp/http.go:430
↓ 3 callersFunctionInstrumentRoundTripperCounter
InstrumentRoundTripperCounter is a middleware that wraps the provided http.RoundTripper to observe the request result with the provided CounterVec. Th
prometheus/promhttp/instrument_client.go:65
↓ 3 callersFunctionInstrumentRoundTripperDuration
InstrumentRoundTripperDuration is a middleware that wraps the provided http.RoundTripper to observe the request duration with the provided ObserverVec
prometheus/promhttp/instrument_client.go:108
↓ 3 callersFunctionInstrumentRoundTripperInFlight
InstrumentRoundTripperInFlight is a middleware that wraps the provided http.RoundTripper. It sets the provided prometheus.Gauge to the number of reque
prometheus/promhttp/instrument_client.go:40
↓ 3 callersMethodMaybeUnwrap
MaybeUnwrap returns nil if len(errs) is 0. It returns the first and only contained error as error if len(errs is 1). In all other cases, it returns th
prometheus/registry.go:255
↓ 3 callersMethodMustCurryWith
MustCurryWith works as CurryWith but panics where CurryWith would have returned an error.
prometheus/histogram.go:1306
↓ 3 callersFunctionMustNewConstHistogram
MustNewConstHistogram is a version of NewConstHistogram that panics where NewConstHistogram would have returned an error.
prometheus/histogram.go:1391
↓ 3 callersFunctionNew
New creates a new Pusher to push to the provided URL with the provided job name (which must not be empty). You can use just host:port or ip:port as ur
prometheus/push/push.go:91
↓ 3 callersFunctionNew
New creates a new Linter that reads an input stream of Prometheus metrics in the Prometheus text exposition format.
prometheus/testutil/promlint/promlint.go:42
↓ 3 callersFunctionNewCollector
NewCollector returns a collector that exports metrics about current version information.
prometheus/collectors/version/version.go:39
↓ 3 callersFunctionNewConstMetric
NewConstMetric returns a metric with one fixed value that cannot be changed. Users of this package will not have much use for it in regular operations
prometheus/value.go:105
↓ 3 callersFunctionNewMetricWithTimestamp
NewMetricWithTimestamp returns a new Metric wrapping the provided Metric in a way that it has an explicit timestamp set to the provided Time. This is
prometheus/metric.go:173
↓ 3 callersMethodNewSummaryVec
NewSummaryVec creates a new SummaryVec based on the provided SummaryVecOpts.
prometheus/summary.go:574
↓ 3 callersMethodNextDelay
()
exp/internal/github.com/efficientgo/core/backoff/backoff.go:86
↓ 3 callersFunctionNormalizeMetricFamilies
NormalizeMetricFamilies returns a MetricFamily slice with empty MetricFamilies pruned and the remaining MetricFamilies sorted by name within the slice
prometheus/internal/metric.go:85
↓ 3 callersMethodPush
Push pushes Prometheus metrics to the configured Graphite server.
prometheus/graphite/bridge.go:166
↓ 3 callersFunctionRuntimeMetricsBucketsForUnit
RuntimeMetricsBucketsForUnit takes a set of buckets obtained for a runtime/metrics histogram type (so, lower-bound inclusive) and a unit from a runtim
prometheus/internal/go_runtime_metrics.go:85
↓ 3 callersMethodServeHTTP
(w http.ResponseWriter, r *http.Request)
exp/api/remote/remote_api.go:569
↓ 3 callersMethodSetStatusCode
SetStatusCode sets the HTTP status code for the response. http.StatusNoContent is the default unless 5xx is set.
exp/api/remote/remote_headers.go:124
↓ 3 callersMethodSetToCurrentTime
SetToCurrentTime sets the Gauge to the current Unix time in seconds.
prometheus/gauge.go:52
↓ 3 callersFunctionSizeOfZigzag
SizeOfZigzag returns the size of the zigzag-encoded value.
exp/internal/github.com/planetscale/vtprotobuf/protohelpers/protohelpers.go:43
↓ 3 callersFunctionSplitLines
Split a string on "\n" while preserving them. The output can be used as input for UnifiedDiff and ContextDiff structures.
prometheus/internal/difflib.go:651
↓ 3 callersMethodStats
Stats returns the current statistics.
exp/api/remote/remote_headers.go:119
↓ 3 callersMethodStore
Store stores remote write metrics encoded in the given WriteContentType. Provided http.Request contains the encoded bytes in the req.Body with all the
exp/api/remote/remote_api.go:415
↓ 3 callersMethodSub
Sub subtracts the given value from the Gauge. (The value can be negative, resulting in an increase of the Gauge.)
prometheus/gauge.go:49
↓ 3 callersMethodSymbolize
Symbolize adds (if not added before) a string to the symbols table, while returning its reference number.
exp/api/remote/genproto/v2/symbols.go:50
↓ 3 callersFunctionToTransactionalGatherer
ToTransactionalGatherer transforms Gatherer to transactional one with noop as done function.
prometheus/registry.go:1111
↓ 3 callersMethodUnmarshalVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:1406
↓ 3 callersMethodUnregister
Unregister unregisters the Collector that equals the Collector passed in as an argument. (Two Collectors are considered equal if their Describe metho
prometheus/registry.go:133
↓ 3 callersMethodWith
With works as GetMetricWith, but panics where GetMetricWithLabels would have returned an error. Not returning an error allows shortcuts like myVec.W
prometheus/counter.go:295
↓ 3 callersMethodWith
With works as GetMetricWith, but panics where GetMetricWithLabels would have returned an error. Not returning an error allows shortcuts like myVec.W
prometheus/gauge.go:249
← previousnext →101–200 of 1,308, ranked by callers