MCPcopy Create free account

hub / github.com/prometheus/client_golang / functions

Functions1,308 in github.com/prometheus/client_golang

↓ 3 callersFunctionWithLabelFromCtx
WithLabelFromCtx registers a label for dynamic resolution with access to context. See the example for ExampleInstrumentHandlerWithLabelResolver for ex
prometheus/promhttp/option.go:102
↓ 3 callersFunctionWithTimeout
WithTimeout can be used to provide an optional query evaluation timeout for Query and QueryRange. https://prometheus.io/docs/prometheus/latest/queryin
api/prometheus/v1/api.go:1138
↓ 3 callersMethodWrapHandler
WrapHandler wraps the given HTTP handler for instrumentation.
examples/middleware/httpmiddleware/httpmiddleware.go:28
↓ 3 callersMethodWriteHeader
(code int)
prometheus/promhttp/delegator.go:55
↓ 3 callersFunctionaddAndResetCounts
addAndResetCounts adds certain fields (count, sum, conventional buckets, zero bucket) from the cold counts to the corresponding fields in the hot coun
prometheus/histogram.go:1673
↓ 3 callersFunctionaddWithExemplar
addWithExemplar records val on c. If labels is non-nil and c implements [prometheus.ExemplarAdder], the exemplar is attached via AddWithExemplar; othe
prometheus/promhttp/instrument_server.go:53
↓ 3 callersFunctionbestEffortLookupRM
(lookup []string)
prometheus/go_collector_latest.go:82
↓ 3 callersFunctioncalculateRatio
(matches, length int)
prometheus/internal/difflib.go:43
↓ 3 callersFunctioncheckLabelName
(l string)
prometheus/labels.go:186
↓ 3 callersFunctioncheckLinesAreEqual
(w, g string, useTags bool)
prometheus/graphite/bridge_test.go:298
↓ 3 callersMethodconstrain
(labelName, value string)
prometheus/labels.go:126
↓ 3 callersFunctionconstrainLabels
(desc *Desc, labels Labels)
prometheus/vec.go:667
↓ 3 callersFunctiondefaultCompressionFormats
()
prometheus/promhttp/http.go:70
↓ 3 callersFunctiondefaultGoCollectorOptions
()
prometheus/go_collector_latest.go:150
↓ 3 callersMethoddescribe
describe returns all descriptions of the collector for windows. Ensure that this list of descriptors is kept in sync with the metrics collected in the
prometheus/process_collector_windows.go:129
↓ 3 callersFunctiondoubleDuration
(value, maxValue time.Duration)
exp/internal/github.com/efficientgo/core/backoff/backoff.go:108
↓ 3 callersFunctionexpectCTsForMetricVecValues
(t testing.TB, vec *MetricVec, typ dto.MetricType, ctsPerLabelValue map[string]time.Time)
prometheus/counter_test.go:357
↓ 3 callersFunctionmarshalFloat
(v float64, stream *json.Stream)
api/prometheus/v1/api.go:212
↓ 3 callersFunctionnewExemplar
newExemplar creates a new dto.Exemplar from the provided values. An error is returned if any of the label names or values are invalid or if the total
prometheus/value.go:245
↓ 3 callersFunctionnewValueFunc
newValueFunc returns a newly allocated valueFunc with the given Desc and ValueType. The value reported is determined by calling the given function fro
prometheus/value.go:79
↓ 3 callersMethodobserve
observe is the implementation for Observe without the findBucket part.
prometheus/histogram.go:904
↓ 3 callersFunctionrep
(s string, count int)
prometheus/internal/difflib_test.go:150
↓ 3 callersFunctionsanitizeMetric
sanitizeMetric injects expected fake created timestamp value "1970-01-01T00:00:10Z", so we can compare it in examples. It modifies metric in-place, th
prometheus/utils_test.go:29
↓ 3 callersFunctiontestCurryVec
(t *testing.T, vec *CounterVec)
prometheus/vec_test.go:506
↓ 3 callersFunctiontestDelete
(t *testing.T, vec *GaugeVec)
prometheus/vec_test.go:63
↓ 3 callersFunctiontestDeleteLabelValues
(t *testing.T, vec *GaugeVec)
prometheus/vec_test.go:131
↓ 3 callersFunctionwaitForRefs
waitForRefs blocks until cg reports at least want in-flight refs, failing the test if that does not happen within a short deadline. It must be called
prometheus/promhttp/http_test.go:1073
↓ 3 callersFunctionwriteSanitized
(buf *bufio.Writer, s string)
prometheus/graphite/bridge.go:285
↓ 2 callersMethodClient
Client sets a custom HTTP client for the Pusher. For convenience, this method returns a pointer to the Pusher itself. Pusher only needs one method of
prometheus/push/push.go:200
↓ 2 callersFunctionCollectAndLint
CollectAndLint registers the provided Collector with a newly created pedantic Registry. It then calls GatherAndLint with that Registry and with the pr
prometheus/testutil/lint.go:26
↓ 2 callersMethodDescriptor
Deprecated: Use Sample.ProtoReflect.Descriptor instead.
exp/api/remote/genproto/v2/types.pb.go:466
↓ 2 callersMethodDo
(ctx context.Context, req *http.Request)
api/prometheus/v1/api.go:1503
↓ 2 callersMethodEnum
()
exp/api/remote/genproto/v2/types.pb.go:76
↓ 2 callersMethodErr
Err returns the reason for terminating the backoff, or nil if it didn't terminate.
exp/internal/github.com/efficientgo/core/backoff/backoff.go:57
↓ 2 callersMethodGather
()
prometheus/promhttp/http.go:113
↓ 2 callersFunctionGatherAndCompare
GatherAndCompare gathers all metrics from the provided Gatherer and compares it to an expected output read from the provided Reader in the Prometheus
prometheus/testutil/testutil.go:211
↓ 2 callersMethodGatherer
Gatherer adds a Gatherer to the Pusher, from which metrics will be gathered to push them to the Pushgateway. The gathered metrics must not contain a j
prometheus/push/push.go:155
↓ 2 callersMethodGetCount
()
exp/api/remote/genproto/v2/types.pb.go:676
↓ 2 callersMethodGetMatchingBlocks
Return list of triples describing matching subsequences. Each triple is of the form (i, j, n), and means that a[i:i+n] == b[j:j+n]. The triples are
prometheus/internal/difflib.go:311
↓ 2 callersMethodGetMetricWith
GetMetricWith returns the Counter for the given Labels map (the label names must match those of the variable labels in Desc). If that label map is acc
prometheus/counter.go:270
↓ 2 callersFunctionGetUnifiedDiffString
Like WriteUnifiedDiff but returns the diff a string.
prometheus/internal/difflib.go:643
↓ 2 callersMethodGrouping
Grouping adds a label pair to the grouping key of the Pusher, replacing any previously added label pair with the same label name. Note that setting an
prometheus/push/push.go:183
↓ 2 callersFunctionInstrumentHandlerRequestSize
InstrumentHandlerRequestSize is a middleware that wraps the provided http.Handler to observe the request size with the provided ObserverVec. The Obser
prometheus/promhttp/instrument_server.go:243
↓ 2 callersFunctionInstrumentRoundTripperTrace
InstrumentRoundTripperTrace is a middleware that wraps the provided RoundTripper and reports times to hook functions provided in the InstrumentTrace s
prometheus/promhttp/instrument_client.go:165
↓ 2 callersMethodMarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:43
↓ 2 callersMethodMarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:97
↓ 2 callersMethodMarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:201
↓ 2 callersMethodMarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:265
↓ 2 callersMethodMarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:309
↓ 2 callersMethodMarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:357
↓ 2 callersMethodMarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:583
↓ 2 callersFunctionMustNewConstSummary
MustNewConstSummary is a version of NewConstSummary that panics where NewConstMetric would have returned an error.
prometheus/summary.go:781
↓ 2 callersFunctionMustNewMetricWithExemplars
MustNewMetricWithExemplars is a version of NewMetricWithExemplars that panics where NewMetricWithExemplars would have returned an error.
prometheus/metric.go:273
↓ 2 callersFunctionNegotiateContentEncoding
NegotiateContentEncoding returns the best offered content encoding for the request's Accept-Encoding header. If two offers match with equal weight and
internal/github.com/golang/gddo/httputil/negotiate.go:19
↓ 2 callersFunctionNew
New creates a Backoff object. Pass a Context that can also terminate the operation.
exp/internal/github.com/efficientgo/core/backoff/backoff.go:34
↓ 2 callersFunctionNewBridge
NewBridge returns a pointer to a new Bridge struct.
prometheus/graphite/bridge.go:106
↓ 2 callersFunctionNewConstHistogramWithCreatedTimestamp
NewConstHistogramWithCreatedTimestamp does the same thing as NewConstHistogram but sets the created timestamp.
prometheus/histogram.go:1406
↓ 2 callersFunctionNewConstMetricWithCreatedTimestamp
NewConstMetricWithCreatedTimestamp does the same thing as NewConstMetric, but generates Counters with created timestamp set and returns an error for o
prometheus/value.go:136
↓ 2 callersFunctionNewConstNativeHistogram
NewConstNativeHistogram returns a metric representing a Prometheus native histogram with fixed values for the count, sum, and positive/negative/zero b
prometheus/histogram.go:1918
↓ 2 callersFunctionNewConstSummaryWithCreatedTimestamp
NewConstSummaryWithCreatedTimestamp does the same thing as NewConstSummary but sets the created timestamp.
prometheus/summary.go:796
↓ 2 callersMethodNewCounterVec
NewCounterVec works like the function of the same name in the prometheus package but it automatically registers the CounterVec with the Factory's Regi
prometheus/promauto/auto.go:273
↓ 2 callersFunctionNewExpvarCollector
NewExpvarCollector is the obsolete version of collectors.NewExpvarCollector. See there for documentation. Deprecated: Use collectors.NewExpvarCollect
prometheus/expvar_collector.go:29
↓ 2 callersMethodNewGaugeFunc
NewGaugeFunc works like the function of the same name in the prometheus package but it automatically registers the GaugeFunc with the Factory's Regist
prometheus/promauto/auto.go:316
↓ 2 callersMethodNewHistogram
NewHistogram works like the function of the same name in the prometheus package but it automatically registers the Histogram with the Factory's Regist
prometheus/promauto/auto.go:348
↓ 2 callersMethodNewHistogramVec
NewHistogramVec works like the function of the same name in the prometheus package but it automatically registers the HistogramVec with the Factory's
prometheus/promauto/auto.go:359
↓ 2 callersFunctionNewMetricWithExemplars
NewMetricWithExemplars returns a new Metric wrapping the provided Metric with given exemplars. Exemplars are validated. Only last applicable exemplar
prometheus/metric.go:247
↓ 2 callersFunctionNewWriteHandler
NewWriteHandler returns an HTTP handler that can receive the Remote Write 1.0 or Remote Write 2.0 (https://prometheus.io/docs/specs/remote_write_spec_
exp/api/remote/remote_api.go:513
↓ 2 callersMethodOngoing
Ongoing returns true if caller should keep going.
exp/internal/github.com/efficientgo/core/backoff/backoff.go:51
↓ 2 callersFunctionParseAccept
ParseAccept parses Accept* headers.
internal/github.com/golang/gddo/httputil/header/header.go:64
↓ 2 callersFunctionParseOptions
(args []string)
tutorials/whatsup/internal/common.go:102
↓ 2 callersMethodPush
Push collects/gathers all metrics from all Collectors and Gatherers added to this Pusher. Then, it pushes them to the Pushgateway configured while cre
prometheus/push/push.go:125
↓ 2 callersMethodQuickRatio
Return an upper bound on ratio() relatively quickly. This isn't defined beyond that it is an upper bound on .Ratio(), and is faster to compute.
prometheus/internal/difflib.go:485
↓ 2 callersMethodRealQuickRatio
Return an upper bound on ratio() very quickly. This isn't defined beyond that it is an upper bound on .Ratio(), and is faster to compute than either
prometheus/internal/difflib.go:517
↓ 2 callersMethodSetSeqs
Set two sequences to be compared.
prometheus/internal/difflib.go:118
↓ 2 callersMethodSizeVT
()
exp/api/remote/genproto/v2/types_vtproto.pb.go:608
↓ 2 callersMethodSizeVT
()
exp/api/remote/genproto/v2/types_vtproto.pb.go:630
↓ 2 callersMethodSizeVT
()
exp/api/remote/genproto/v2/types_vtproto.pb.go:672
↓ 2 callersMethodSizeVT
()
exp/api/remote/genproto/v2/types_vtproto.pb.go:695
↓ 2 callersMethodSizeVT
()
exp/api/remote/genproto/v2/types_vtproto.pb.go:711
↓ 2 callersMethodSizeVT
()
exp/api/remote/genproto/v2/types_vtproto.pb.go:730
↓ 2 callersMethodSizeVT
()
exp/api/remote/genproto/v2/types_vtproto.pb.go:832
↓ 2 callersFunctionSnappyDecodeMiddleware
SnappyDecodeMiddleware returns a middleware that checks if the request body is snappy-encoded and decompresses it. If the request body is not snappy-e
exp/api/remote/remote_api.go:460
↓ 2 callersMethodSymbolizeLabels
SymbolizeLabels symbolize Prometheus labels.
exp/api/remote/genproto/v2/symbols.go:61
↓ 2 callersMethodUnmarshalJSON
(b []byte)
api/prometheus/v1/api.go:746
↓ 2 callersFunctionUnregister
Unregister removes the registration of the provided Collector from the DefaultRegisterer. Unregister is a shortcut for DefaultRegisterer.Unregister(c
prometheus/registry.go:185
↓ 2 callersMethodValidate
Validate returns error if the given reference for the protobuf message is not supported.
exp/api/remote/remote_headers.go:58
↓ 2 callersFunctionWithWriteHandlerLogger
WithWriteHandlerLogger returns WriteHandlerOption that allows providing slog logger. By default, nothing is logged.
exp/api/remote/remote_api.go:434
↓ 2 callersFunctionWithoutGoCollectorRuntimeMetrics
WithoutGoCollectorRuntimeMetrics allows disabling group of runtime/metrics that you might have added in WithGoCollectorRuntimeMetrics. It behaves simi
prometheus/collectors/go_collector_latest.go:117
↓ 2 callersFunctionWrapCollectorWith
WrapCollectorWith returns a Collector wrapping the provided Collector. The wrapped Collector will add the provided Labels to all Metrics it collects (
prometheus/wrap.go:97
↓ 2 callersFunctionWrapRegistererWithPrefix
WrapRegistererWithPrefix returns a Registerer wrapping the provided Registerer. Collectors registered with the returned Registerer will be registered
prometheus/wrap.go:74
↓ 2 callersMethodWrite
(pb *dto.Metric)
prometheus/metric.go:183
↓ 2 callersMethodWriteHeader
(int)
prometheus/promhttp/instrument_server_test.go:579
↓ 2 callersFunctionassertAlmostEqual
(t *testing.T, a, b float64, places int)
prometheus/internal/difflib_test.go:24
↓ 2 callersFunctionassertEqualMFs
(t *testing.T, wantMF, gotMF []*dto.MetricFamily)
prometheus/wrap_test.go:314
↓ 2 callersFunctionatomicAddFloat
atomicAddFloat adds the provided float atomically to another float represented by the bit pattern the bits pointer is pointing to.
prometheus/histogram.go:1654
↓ 2 callersFunctionbenchmarkMetricVecWithLabelValues
(b *testing.B, labels map[string][]string)
prometheus/vec_test.go:980
↓ 2 callersFunctionbenchmarkSplitLines
(b *testing.B, count int)
prometheus/internal/difflib_test.go:249
↓ 2 callersFunctioncheckMetricConsistency
checkMetricConsistency checks if the provided Metric is consistent with the provided MetricFamily. It also hashes the Metric labels and the MetricFami
prometheus/registry.go:916
↓ 2 callersFunctioncheckSuffixCollisions
checkSuffixCollisions checks for collisions with the “magic” suffixes the Prometheus text format and the internal metric representation of the Prometh
prometheus/registry.go:855
↓ 2 callersFunctioncompareMetricFamilies
compareMetricFamilies would compare 2 slices of metric families, and optionally filters both of them to the `metricNames` provided.
prometheus/testutil/testutil.go:290
← previousnext →201–300 of 1,308, ranked by callers