Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/prometheus/common
/ functions
Functions
800 in github.com/prometheus/common
⨍
Functions
800
◇
Types & classes
130
↓ 2 callers
Function
testMetric
(t testing.TB)
model/metric_test.go:39
↓ 2 callers
Function
testTextParse
(t testing.TB)
expfmt/text_parse_test.go:45
↓ 2 callers
Function
testTextParseError
(t testing.TB)
expfmt/text_parse_test.go:1003
↓ 2 callers
Function
updateRootCA
updateRootCA parses the given byte slice as a series of PEM encoded certificates and updates tls.Config.RootCAs.
config/http_config.go:1468
↓ 2 callers
Method
usingClientCert
()
config/http_config.go:1402
↓ 2 callers
Method
usingClientKey
()
config/http_config.go:1406
↓ 2 callers
Function
writeCompositeHistogram
(w enhancedWriter, name string, metric *dto.Metric, isGauge bool)
expfmt/openmetrics_2_0_create.go:516
↓ 2 callers
Function
writeCompositeSummary
(w enhancedWriter, name string, metric *dto.Metric)
expfmt/openmetrics_2_0_create.go:369
↓ 2 callers
Function
writeExemplar20
writeExemplar20 writes the provided exemplar in OpenMetrics 2.0 format to w. In OpenMetrics 2.0, invalid exemplars or exemplars without a timestamp ar
expfmt/openmetrics_2_0_create.go:313
↓ 2 callers
Function
writeOpenMetrics20Sample
writeOpenMetrics20Sample writes a single sample for simple types (Counter, Gauge, Untyped).
expfmt/openmetrics_2_0_create.go:239
↓ 1 callers
Method
Clone
Clone returns a copy of the label set.
model/labelset.go:109
↓ 1 callers
Method
CloseIdleConnections
()
config/http_config.go:1619
↓ 1 callers
Method
Del
Del registers a new DELETE route.
route/route.go:103
↓ 1 callers
Function
EncodeKey
(w io.Writer, priv *rsa.PrivateKey)
config/generate.go:45
↓ 1 callers
Method
Equal
Equal returns true if both sets contain the same elements (and not more).
model/fingerprinting.go:67
↓ 1 callers
Method
Equal
(o *SampleHistogramPair)
model/value_histogram.go:177
↓ 1 callers
Function
ExtractSamples
ExtractSamples builds a slice of samples from the provided metric families. If an error occurs during sample extraction, it continues to extract from
expfmt/decode.go:276
↓ 1 callers
Method
FastFingerprint
FastFingerprint returns a Metric's Fingerprint calculated by a faster hashing algorithm, which is, however, more susceptible to hash collisions.
model/metric.go:298
↓ 1 callers
Function
FingerprintFromString
FingerprintFromString transforms a string representation into a Fingerprint.
model/fingerprinting.go:26
↓ 1 callers
Function
FloatToTime
(v float64)
helpers/templates/time.go:49
↓ 1 callers
Function
GenerateCertificate
(caCert *x509.Certificate, caKey *rsa.PrivateKey, server bool, name string, ipAddresses ...net.IP)
config/generate.go:117
↓ 1 callers
Function
GenerateCertificateAuthority
(commonName string, parentCert *x509.Certificate, parentKey *rsa.PrivateKey)
config/generate.go:75
↓ 1 callers
Method
HasFiring
HasFiring returns true iff one of the alerts is not resolved.
model/alert.go:127
↓ 1 callers
Method
HasFiringAt
HasFiringAt returns true iff one of the alerts is not resolved at the time ts.
model/alert.go:138
↓ 1 callers
Method
Intersection
Intersection returns the elements contained in both sets.
model/fingerprinting.go:82
↓ 1 callers
Function
IsValidMetricName
IsValidMetricName returns true iff name matches the pattern of MetricNameRE for legacy names, and iff it's valid UTF-8 if the UTF8Validation scheme is
model/metric.go:308
↓ 1 callers
Method
Level
Level returns the value of the logging level as an slog.Level.
promslog/slog.go:80
↓ 1 callers
Function
LoadHTTPConfig
LoadHTTPConfig parses the YAML input s into a HTTPClientConfig.
config/http_config.go:307
↓ 1 callers
Method
MarshalText
MarshalText implements the encoding.TextMarshaler interface.
model/time.go:353
↓ 1 callers
Method
Merge
Merge is a helper function to non-destructively merge two label sets.
model/labelset.go:116
↓ 1 callers
Method
Milliseconds
Milliseconds returns the duration as an integer millisecond count. Prometheus stores timestamps in milliseconds; time.Duration already covers the othe
model/time.go:193
↓ 1 callers
Function
New
(fs embed.FS)
assets/embed_gzip.go:32
↓ 1 callers
Function
NewBasicAuthRoundTripper
NewBasicAuthRoundTripper will apply a BASIC auth authorization header to a request unless it has already been set.
config/http_config.go:906
↓ 1 callers
Function
NewHostRoundTripper
NewHostRoundTripper sets the [http.Request.Host] of every request.
config/http_config.go:1643
↓ 1 callers
Function
NewOpenMetricsFormat
NewOpenMetricsFormat generates a new OpenMetrics format matching the specified version number. Note: OpenMetrics versions 2.0.0-rc and 2.0.0 are expe
expfmt/expfmt.go:119
↓ 1 callers
Function
NewRoundTripperFromConfigWithContext
NewRoundTripperFromConfigWithContext returns a new HTTP RoundTripper configured for the given config.HTTPClientConfig and config.HTTPClientOption. The
config/http_config.go:628
↓ 1 callers
Function
NewTLSConfigWithContext
NewTLSConfigWithContext creates a new tls.Config from the given TLSConfig.
config/http_config.go:1267
↓ 1 callers
Method
Open
Open implements the fs.FS interface.
assets/embed_gzip.go:37
↓ 1 callers
Function
ParseDurationAllowNegative
ParseDurationAllowNegative is like ParseDuration but also accepts negative durations.
model/time.go:284
↓ 1 callers
Function
ParseFingerprint
ParseFingerprint parses the input string into a fingerprint.
model/fingerprinting.go:32
↓ 1 callers
Function
PrometheusUserAgent
()
version/info.go:111
↓ 1 callers
Method
Query
Query registers a new QUERY route.
route/route.go:123
↓ 1 callers
Method
Redacted
Redacted returns the URL but replaces any password with "xxxxx".
config/http_config.go:203
↓ 1 callers
Function
SignatureForLabels
SignatureForLabels works like LabelsToSignature but takes a Metric as parameter (rather than a label map) and only includes the labels with the specif
model/signature.go:98
↓ 1 callers
Function
SignatureWithoutLabels
SignatureWithoutLabels works like LabelsToSignature but takes a Metric as parameter (rather than a label map) and excludes the labels with any of the
model/signature.go:118
↓ 1 callers
Method
Size
Size implements the fs.FileInfo interface.
assets/embed_gzip.go:111
↓ 1 callers
Method
Stat
Stat implements the fs.File interface.
assets/embed_gzip.go:73
↓ 1 callers
Function
StaticFileServer
(root http.FileSystem)
server/static_file_server.go:41
↓ 1 callers
Method
Status
Status returns the status of the alert.
model/alert.go:78
↓ 1 callers
Method
Status
Status returns StatusFiring iff at least one of the alerts is firing.
model/alert.go:148
↓ 1 callers
Method
StatusAt
StatusAt returns StatusFiring iff at least one of the alerts is firing at the time ts.
model/alert.go:157
↓ 1 callers
Method
String
()
promslog/slog.go:126
↓ 1 callers
Method
String
()
model/value_float.go:63
↓ 1 callers
Method
String
String returns a string representation of the Time.
model/time.go:115
↓ 1 callers
Method
String
()
model/value_type.go:69
↓ 1 callers
Method
String
()
model/value_histogram.go:26
↓ 1 callers
Method
Sub
Sub returns the Duration t - o.
model/time.go:90
↓ 1 callers
Function
ToEscapingScheme
(s string)
model/metric.go:567
↓ 1 callers
Method
TokenSource
TokenSource returns a JWT TokenSource using the configuration in c and the HTTP client from the provided context.
config/oauth_assertion.go:88
↓ 1 callers
Method
TokenSource
(ctx context.Context)
config/http_config.go:978
↓ 1 callers
Method
UnmarshalText
UnmarshalText implements the encoding.TextUnmarshaler interface.
model/time.go:358
↓ 1 callers
Method
Validate
Validate returns true iff all fields of the matcher have valid values.
model/silence.go:49
↓ 1 callers
Function
WithHost
WithHost allows setting the host header.
config/http_config.go:565
↓ 1 callers
Function
WithIdleConnTimeout
WithIdleConnTimeout allows setting the idle connection timeout.
config/http_config.go:551
↓ 1 callers
Function
WithParam
WithParam returns a new context with param p set to v.
route/route.go:40
↓ 1 callers
Method
WithPrefix
WithPrefix returns a router that prefixes all registered routes with prefix.
route/route.go:71
↓ 1 callers
Function
WithUserAgent
WithUserAgent allows setting the user agent.
config/http_config.go:558
↓ 1 callers
Method
applyToTLSConfigOptions
(options *tlsConfigOptions)
config/http_config.go:1258
↓ 1 callers
Function
benchmarkMetricFamilies
()
expfmt/benchmark_test.go:26
↓ 1 callers
Function
computeRevision
()
version/info.go:123
↓ 1 callers
Function
emitOpenMetrics20Family
(st *openMetricsFamilyState, v *dto.MetricFamily)
expfmt/openmetrics_2_0_parse.go:248
↓ 1 callers
Function
emitOpenMetricsFamily
(st *openMetricsFamilyState, v *dto.MetricFamily, lineNum int)
expfmt/openmetrics_parse.go:215
↓ 1 callers
Function
escapingFor
escapingFor returns the escaping term for the Accept clause that matched f.
expfmt/encode.go:161
↓ 1 callers
Function
extractCounter
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:308
↓ 1 callers
Function
extractDescriptorMetricName
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_2_0_parse.go:375
↓ 1 callers
Function
extractGauge
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:339
↓ 1 callers
Function
extractHistogram
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:458
↓ 1 callers
Function
extractLabelsFromList
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_parse.go:975
↓ 1 callers
Function
extractNumberList
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_2_0_parse.go:1305
↓ 1 callers
Function
extractSummary
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:401
↓ 1 callers
Function
extractUntyped
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:370
↓ 1 callers
Function
generateData
(timeseries, datapoints int)
model/api_bench_test.go:22
↓ 1 callers
Method
getClientCertificate
getClientCertificate reads the pair of client cert and key and returns a tls.Certificate.
config/http_config.go:1431
↓ 1 callers
Function
getLogEntryLevelCounts
(s string, re *regexp.Regexp)
promslog/slog_test.go:83
↓ 1 callers
Function
getOpenMetrics10Grammar
()
expfmt/openmetrics_parse.go:151
↓ 1 callers
Function
getOpenMetrics20Grammar
()
expfmt/openmetrics_2_0_parse.go:194
↓ 1 callers
Method
getOrCreateDescriptorFamily
(name string)
expfmt/openmetrics_2_0_parse.go:384
↓ 1 callers
Method
getOrCreateDescriptorFamily
(name string)
expfmt/openmetrics_parse.go:340
↓ 1 callers
Method
handleDescriptor
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_2_0_parse.go:415
↓ 1 callers
Method
handleDescriptor
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_parse.go:368
↓ 1 callers
Method
handleSample
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_2_0_parse.go:523
↓ 1 callers
Method
handleSample
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_parse.go:577
↓ 1 callers
Function
histogramMetricName
(name string)
expfmt/text_parse.go:989
↓ 1 callers
Function
isBucket
(name string)
expfmt/text_parse.go:974
↓ 1 callers
Function
isValidMetricNameContinuation
(b byte, quoted bool)
expfmt/text_parse.go:958
↓ 1 callers
Function
isValidMetricNameStart
(b byte)
expfmt/text_parse.go:954
↓ 1 callers
Function
isdigit
(c byte)
model/time.go:207
↓ 1 callers
Function
loadHTTPConfigJSON
loadHTTPConfigJSON parses the JSON input s into a HTTPClientConfig.
config/http_config_test.go:2509
↓ 1 callers
Function
lower
lower function taken from strconv.atoi.
model/metric.go:466
↓ 1 callers
Function
mapToValues
(m map[string]string)
config/http_config.go:1137
← previous
next →
201–300 of 800, ranked by callers