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
MarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:545
↓ 1 callers
Method
MarshalToSizedBufferVT
(dAtA []byte)
exp/api/remote/genproto/v2/types_vtproto.pb.go:557
↓ 1 callers
Method
Metadata
(ctx context.Context, metric, limit string)
api/prometheus/v1/api.go:1346
↓ 1 callers
Method
MustCurryWith
MustCurryWith works as CurryWith but panics where CurryWith would have returned an error.
prometheus/counter.go:326
↓ 1 callers
Function
MustNewConstHistogramWithCreatedTimestamp
MustNewConstHistogramWithCreatedTimestamp is a version of NewConstHistogramWithCreatedTimestamp that panics where NewConstHistogramWithCreatedTimestam
prometheus/histogram.go:1432
↓ 1 callers
Function
MustNewConstMetricWithCreatedTimestamp
MustNewConstMetricWithCreatedTimestamp is a version of NewConstMetricWithCreatedTimestamp that panics where NewConstMetricWithCreatedTimestamp would h
prometheus/value.go:163
↓ 1 callers
Function
MustNewConstNativeHistogram
MustNewConstNativeHistogram is a version of NewConstNativeHistogram that panics where NewConstNativeHistogram would have returned an error.
prometheus/histogram.go:1974
↓ 1 callers
Function
MustNewConstSummaryWithCreatedTimestamp
MustNewConstSummaryWithCreatedTimestamp is a version of NewConstSummaryWithCreatedTimestamp that panics where NewConstSummaryWithCreatedTimestamp woul
prometheus/summary.go:822
↓ 1 callers
Function
New
New returns a Middleware interface.
examples/middleware/httpmiddleware/httpmiddleware.go:92
↓ 1 callers
Function
NewAPI
NewAPI returns a new API for the clients of Remote Write Protocol.
exp/api/remote/remote_api.go:134
↓ 1 callers
Function
NewBuildInfoCollector
NewBuildInfoCollector is the obsolete version of collectors.NewBuildInfoCollector. See there for documentation. Deprecated: Use collectors.NewBuildIn
prometheus/build_info_collector.go:22
↓ 1 callers
Function
NewBuildInfoCollector
NewBuildInfoCollector returns a collector collecting a single metric "go_build_info" with the constant value 1 and three labels "path", "version", and
prometheus/collectors/collectors.go:37
↓ 1 callers
Function
NewClusterManager
NewClusterManager first creates a Prometheus-ignorant ClusterManager instance. Then, it creates a ClusterManagerCollector for the just created Cluster
prometheus/example_clustermanager_test.go:113
↓ 1 callers
Function
NewConstHistogram
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:1367
↓ 1 callers
Function
NewConstSummary
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:757
↓ 1 callers
Function
NewCounterFunc
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:353
↓ 1 callers
Method
NewCounterFunc
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 callers
Function
NewDBStatsCollector
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 callers
Method
NewGaugeVec
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 callers
Function
NewInfoVec
(name, help string, labelNames []string)
prometheus/example_metricvec_test.go:55
↓ 1 callers
Function
NewMatcherWithJunk
(a, b []string, autoJunk bool, isJunk func(string) bool, )
prometheus/internal/difflib.go:109
↓ 1 callers
Function
NewMetrics
(reg prometheus.Registerer, normMean, normDomain float64)
examples/random/main.go:38
↓ 1 callers
Function
NewMultiTRegistry
NewMultiTRegistry creates MultiTRegistry.
prometheus/registry.go:1051
↓ 1 callers
Function
NewPidFileFn
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:167
↓ 1 callers
Method
NewSummary
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 callers
Method
NewSummaryVec
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 callers
Function
NewSymbolTable
NewSymbolTable returns a symbol table.
exp/api/remote/genproto/v2/symbols.go:40
↓ 1 callers
Function
NewUntypedFunc
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 callers
Method
NewUntypedFunc
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 callers
Function
NewWithMetricFamilies
NewWithMetricFamilies creates a new Linter that reads from a slice of MetricFamily protobuf messages.
prometheus/testutil/promlint/promlint.go:50
↓ 1 callers
Method
NoDataWritten
NoDataWritten returns true if statistics indicate no data was written.
exp/api/remote/remote_headers.go:171
↓ 1 callers
Method
NumRetries
NumRetries returns the number of retries so far.
exp/internal/github.com/efficientgo/core/backoff/backoff.go:68
↓ 1 callers
Method
ObserveDurationWithExemplar
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 callers
Function
ParseProtoMsg
ParseProtoMsg parses the content-type header and returns the proto message type. The expected content-type will be of the form, - `application/x-prot
exp/api/remote/remote_api.go:544
↓ 1 callers
Function
PointOf
(value T)
prometheus/metric_test.go:293
↓ 1 callers
Method
Query
(ctx context.Context, query string, ts time.Time, opts ...Option)
api/prometheus/v1/api.go:1195
↓ 1 callers
Method
QueryExemplars
(ctx context.Context, query string, startTime, endTime time.Time)
api/prometheus/v1/api.go:1426
↓ 1 callers
Method
QueryRange
(ctx context.Context, query string, r Range, opts ...Option)
api/prometheus/v1/api.go:1213
↓ 1 callers
Method
ReadFrom
(re io.Reader)
prometheus/promhttp/delegator.go:111
↓ 1 callers
Method
ReadFrom
(io.Reader)
prometheus/promhttp/instrument_server_test.go:567
↓ 1 callers
Method
ReallyExpensiveAssessmentOfTheSystemState
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 callers
Method
Register
(c Collector)
prometheus/wrap.go:121
↓ 1 callers
Method
Reset
()
exp/api/remote/genproto/v2/types.pb.go:438
↓ 1 callers
Method
RetryAfter
()
exp/api/remote/remote_api.go:171
↓ 1 callers
Method
Rules
(ctx context.Context, matches []string)
api/prometheus/v1/api.go:1278
↓ 1 callers
Method
Runtimeinfo
(ctx context.Context)
api/prometheus/v1/api.go:1049
↓ 1 callers
Method
Series
Series finds series by label matchers.
api/prometheus/v1/api.go:494
↓ 1 callers
Method
Series
(ctx context.Context, matches []string, startTime, endTime time.Time, opts ...Option)
api/prometheus/v1/api.go:1231
↓ 1 callers
Method
Set
(val float64)
prometheus/gauge.go:107
↓ 1 callers
Method
SetExtraHeader
SetExtraHeader adds additional headers to be set in the response (apart from stats headers)
exp/api/remote/remote_headers.go:129
↓ 1 callers
Method
SetReadDeadline
(deadline time.Time)
prometheus/promhttp/delegator_test.go:51
↓ 1 callers
Method
SetSeq1
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:132
↓ 1 callers
Method
SetSeq2
Set the second sequence to be compared. The first sequence to be compared is not changed.
prometheus/internal/difflib.go:143
↓ 1 callers
Method
SetWriteDeadline
(deadline time.Time)
prometheus/promhttp/delegator_test.go:45
↓ 1 callers
Method
Size
()
exp/api/remote/remote_api.go:196
↓ 1 callers
Method
SizeVT
()
exp/api/remote/genproto/v2/types_vtproto.pb.go:796
↓ 1 callers
Method
SizeVT
()
exp/api/remote/genproto/v2/types_vtproto.pb.go:805
↓ 1 callers
Method
SizeVT
()
exp/api/remote/genproto/v2/types_vtproto.pb.go:814
↓ 1 callers
Method
SizeVT
()
exp/api/remote/genproto/v2/types_vtproto.pb.go:823
↓ 1 callers
Method
Snapshot
(ctx context.Context, skipHead bool)
api/prometheus/v1/api.go:1255
↓ 1 callers
Method
String
()
prometheus/gen_go_collector_metrics_set.go:109
↓ 1 callers
Method
String
()
exp/api/remote/genproto/v2/types.pb.go:379
↓ 1 callers
Method
Symbols
Symbols returns computes symbols table to put in e.g. Request.Symbols. As per spec, order does not matter.
exp/api/remote/genproto/v2/symbols.go:74
↓ 1 callers
Method
TSDB
(ctx context.Context, opts ...Option)
api/prometheus/v1/api.go:1370
↓ 1 callers
Method
TSDBBlocks
(ctx context.Context)
api/prometheus/v1/api.go:1390
↓ 1 callers
Method
Targets
(ctx context.Context)
api/prometheus/v1/api.go:1303
↓ 1 callers
Method
TargetsMetadata
(ctx context.Context, matchTarget, metric, limit string)
api/prometheus/v1/api.go:1321
↓ 1 callers
Function
ToFloat64
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:82
↓ 1 callers
Function
TransactionalGatherAndCompare
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:222
↓ 1 callers
Method
Type
()
exp/api/remote/genproto/v2/types.pb.go:90
↓ 1 callers
Method
URL
(ep string, args map[string]string)
api/client.go:116
↓ 1 callers
Method
Unwrap
Unwrap lets http.ResponseController get the underlying http.ResponseWriter, by implementing the [rwUnwrapper](https://cs.opensource.google/go/go/+/ref
prometheus/promhttp/delegator.go:81
↓ 1 callers
Method
WalReplay
(ctx context.Context)
api/prometheus/v1/api.go:1408
↓ 1 callers
Method
With
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:1275
↓ 1 callers
Method
With
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:663
↓ 1 callers
Function
WithAPIBackoff
WithAPIBackoff returns APIOption that allows configuring backoff. By default, exponential backoff with jitter is used (see defaultAPIOpts).
exp/api/remote/remote_api.go:119
↓ 1 callers
Function
WithAPIHTTPClient
WithAPIHTTPClient returns APIOption that allows providing http client.
exp/api/remote/remote_api.go:94
↓ 1 callers
Function
WithAPILogger
WithAPILogger returns APIOption that allows providing slog logger. By default, nothing is logged.
exp/api/remote/remote_api.go:86
↓ 1 callers
Function
WithAPIPath
WithAPIPath returns APIOption that allows providing path to send remote write requests to.
exp/api/remote/remote_api.go:102
↓ 1 callers
Function
WithExtraConstLabels
(l prometheus.Labels)
prometheus/collectors/version/version.go:31
↓ 1 callers
Function
WithExtraMethods
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:67
↓ 1 callers
Method
WithLabelValues
(lvs ...string)
prometheus/example_metricvec_test.go:77
↓ 1 callers
Function
WithWriteRetryCallback
WithWriteRetryCallback sets a retry callback for this Write request. The callback is invoked each time the request is retried.
exp/api/remote/remote_api.go:184
↓ 1 callers
Function
WrapCollectorWithPrefix
WrapCollectorWithPrefix returns a Collector wrapping the provided Collector. The wrapped Collector will add the provided prefix to the name of all Met
prometheus/wrap.go:108
↓ 1 callers
Method
Write
Write writes given, non-empty, protobuf message to a remote storage. Depending on serialization methods, - https://github.com/planetscale/vtprotobuf
exp/api/remote/remote_api.go:209
↓ 1 callers
Function
WriteToTextfile
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:635
↓ 1 callers
Function
WriteUnifiedDiff
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:567
↓ 1 callers
Method
Written
()
prometheus/promhttp/delegator.go:35
↓ 1 callers
Function
addAndReset
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:1561
↓ 1 callers
Method
addExemplar
(e *dto.Exemplar)
prometheus/histogram.go:1721
↓ 1 callers
Function
addExpectedDefaultRuntimeMetrics
(metrics map[string]struct{})
prometheus/go_collector_latest_test.go:79
↓ 1 callers
Function
addExpectedRuntimeMemStats
(metrics map[string]struct{})
prometheus/go_collector_latest_test.go:65
↓ 1 callers
Function
addExpectedRuntimeMetrics
(metrics map[string]struct{})
prometheus/go_collector_latest_test.go:72
↓ 1 callers
Function
apiError
(code int)
api/prometheus/v1/api.go:1484
↓ 1 callers
Method
asyncFlush
asyncFlush needs bufMtx locked.
prometheus/summary.go:373
↓ 1 callers
Function
atomicDecUint32
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:1666
↓ 1 callers
Function
attachOriginalName
(desc, origName string)
prometheus/go_collector_latest.go:302
↓ 1 callers
Method
attemptWrite
(ctx context.Context, compr Compression, msgType WriteMessageType, payload []byte, attempt int)
exp/api/remote/remote_api.go:337
↓ 1 callers
Function
benchmarkMetricVecWith
(b *testing.B, labels map[string]string)
prometheus/vec_test.go:959
↓ 1 callers
Function
canCollectProcess
()
prometheus/process_collector_darwin.go:37
← previous
next →
401–500 of 1,308, ranked by callers