Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/prometheus/common
/ functions
Functions
697 in github.com/prometheus/common
⨍
Functions
697
◇
Types & classes
119
↓ 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:205
↓ 1 callers
Function
ResponseFormat
ResponseFormat extracts the correct format from a HTTP response header. If no matching format can be found FormatUnknown is returned.
expfmt/decode.go:43
↓ 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:979
↓ 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
WithCreatedLines
WithCreatedLines is an EncoderOption that configures the OpenMetrics encoder to include _created lines (See https://github.com/prometheus/OpenMetrics/
expfmt/openmetrics_create.go:47
↓ 1 callers
Function
WithHost
WithHost allows setting the host header.
config/http_config.go:567
↓ 1 callers
Function
WithIdleConnTimeout
WithIdleConnTimeout allows setting the idle connection timeout.
config/http_config.go:553
↓ 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:560
↓ 1 callers
Method
applyToTLSConfigOptions
(options *tlsConfigOptions)
config/http_config.go:1254
↓ 1 callers
Function
benchmarkMetricFamilies
()
expfmt/benchmark_test.go:26
↓ 1 callers
Function
computeRevision
()
version/info.go:123
↓ 1 callers
Function
extractCounter
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:236
↓ 1 callers
Function
extractGauge
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:267
↓ 1 callers
Function
extractHistogram
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:386
↓ 1 callers
Function
extractSummary
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:329
↓ 1 callers
Function
extractUntyped
(o *DecodeOptions, f *dto.MetricFamily)
expfmt/decode.go:298
↓ 1 callers
Method
getClientCertificate
getClientCertificate reads the pair of client cert and key and returns a tls.Certificate.
config/http_config.go:1427
↓ 1 callers
Function
getLogEntryLevelCounts
(s string, re *regexp.Regexp)
promslog/slog_test.go:83
↓ 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:1138
↓ 1 callers
Function
matchFormat
matchFormat checks if a parsed accept clause matches a given Format.
expfmt/encode.go:131
↓ 1 callers
Function
metricNeedsEscaping
(m *dto.Metric)
model/metric.go:389
↓ 1 callers
Function
newClient
NewClient returns a http.Client using the specified http.RoundTripper.
config/http_config.go:599
↓ 1 callers
Function
newGoKitStyleReplaceAttrFunc
(lvl *Level)
promslog/slog.go:149
↓ 1 callers
Method
newOauth2TokenSource
(req *http.Request, clientCredential string)
config/http_config.go:982
↓ 1 callers
Function
normalizeHistogram
normalizeHistogram makes sure that all the buckets and the count in each histogram is either completely float or completely integer.
expfmt/text_parse.go:142
↓ 1 callers
Function
originalRequestHost
(req *http.Request)
config/http_config.go:1172
↓ 1 callers
Method
readTokenAsLabelName
readTokenAsLabelName copies a label name from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). Th
expfmt/text_parse.go:817
↓ 1 callers
Method
readTokenAsLabelValue
readTokenAsLabelValue copies a label value from p.buf into p.currentToken. In contrast to the other 'readTokenAs...' functions, which start with the l
expfmt/text_parse.go:868
↓ 1 callers
Method
startOfLine
startOfLine represents the state where the next byte read from p.buf is the start of a line (or whitespace leading up to it).
expfmt/text_parse.go:195
↓ 1 callers
Function
summaryMetricName
(name string)
expfmt/text_parse.go:978
↓ 1 callers
Function
validateExemplar20
(e *dto.Exemplar)
expfmt/openmetrics_2_0_create.go:380
↓ 1 callers
Function
writeCertificateAndKey
(path string, cert *x509.Certificate, key *rsa.PrivateKey)
config/generate.go:164
↓ 1 callers
Function
writeCompositeHistogram
(w enhancedWriter, name string, metric *dto.Metric, isGauge bool)
expfmt/openmetrics_2_0_create.go:352
↓ 1 callers
Function
writeCompositeSummary
Stubs for Summary and Histogram
expfmt/openmetrics_2_0_create.go:345
↓ 1 callers
Function
writeExemplar
writeExemplar writes the provided exemplar in OpenMetrics format to w. The function returns the number of bytes written and any error encountered.
expfmt/openmetrics_create.go:608
↓ 1 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:287
↓ 1 callers
Function
writeNameAndLabelPairs
writeNameAndLabelPairs converts a slice of LabelPair proto messages plus the explicitly given metric name and additional label pair into text formatte
expfmt/text_create.go:354
↓ 1 callers
Function
writeOpenMetricsCreated
writeOpenMetricsCreated writes the created timestamp for a single time series following OpenMetrics text format to w, given the metric name, the metri
expfmt/openmetrics_create.go:569
↓ 1 callers
Function
writeOpenMetricsSample
writeOpenMetricsSample writes a single sample in OpenMetrics text format to w, given the metric name, the metric proto message itself, optionally an a
expfmt/openmetrics_create.go:397
↓ 1 callers
Function
writeSample
writeSample writes a single sample in text format to w, given the metric name, the metric proto message itself, optionally an additional label name wi
expfmt/text_create.go:300
Function
AddFlags
AddFlags adds the flags used by this package to the Kingpin application. To use the default Kingpin application, call AddFlags(kingpin.CommandLine).
promslog/flag/flag.go:44
Method
Before
Before compares the metrics' underlying label sets.
model/metric.go:255
Method
Before
Before compares the metrics, using the following criteria: If m has fewer labels than o, it is before o. If it has more, it is not. If the number of
model/labelset.go:72
Function
BenchmarkConvertMetricFamily
(b *testing.B)
expfmt/benchmark_test.go:188
Function
BenchmarkCreateBuildInfo
(b *testing.B)
expfmt/text_create_test.go:592
Function
BenchmarkDiscriminatorHTTPHeader
(b *testing.B)
expfmt/decode_test.go:483
Function
BenchmarkEmptyLabelSignature
(b *testing.B)
model/signature_test.go:260
Function
BenchmarkJSONMarshallingSampleHistogramPairMatrix
(b *testing.B)
model/value_histogram_test.go:752
Function
BenchmarkJSONMarshallingSamplePairMatrix
(b *testing.B)
model/value_float_test.go:302
Function
BenchmarkLabelNames
(b *testing.B)
model/labels_test.go:52
Function
BenchmarkLabelSetStringMethod
Benchmark Results for LabelSet's String() method -----------------------------------------------------------------------------------------------------
model/labelset_test.go:164
Function
BenchmarkLabelToSignatureDouble
(b *testing.B)
model/signature_test.go:206
Function
BenchmarkLabelToSignatureScalar
(b *testing.B)
model/signature_test.go:198
Function
BenchmarkLabelToSignatureSingle
(b *testing.B)
model/signature_test.go:202
Function
BenchmarkLabelToSignatureTriple
(b *testing.B)
model/signature_test.go:210
Function
BenchmarkLabelValues
(b *testing.B)
model/labels_test.go:88
Function
BenchmarkMetric
(b *testing.B)
model/metric_test.go:100
Function
BenchmarkMetricToFastFingerprintDouble
(b *testing.B)
model/signature_test.go:252
Function
BenchmarkMetricToFastFingerprintScalar
(b *testing.B)
model/signature_test.go:244
Function
BenchmarkMetricToFastFingerprintSingle
(b *testing.B)
model/signature_test.go:248
Function
BenchmarkMetricToFastFingerprintTriple
(b *testing.B)
model/signature_test.go:256
Function
BenchmarkMetricToFastFingerprintTripleConc1
(b *testing.B)
model/signature_test.go:309
Function
BenchmarkMetricToFastFingerprintTripleConc2
(b *testing.B)
model/signature_test.go:313
Function
BenchmarkMetricToFastFingerprintTripleConc4
(b *testing.B)
model/signature_test.go:317
Function
BenchmarkMetricToFastFingerprintTripleConc8
(b *testing.B)
model/signature_test.go:321
Function
BenchmarkMetricToFingerprintDouble
(b *testing.B)
model/signature_test.go:229
Function
BenchmarkMetricToFingerprintScalar
(b *testing.B)
model/signature_test.go:221
Function
BenchmarkMetricToFingerprintSingle
(b *testing.B)
model/signature_test.go:225
Function
BenchmarkMetricToFingerprintTriple
(b *testing.B)
model/signature_test.go:233
← previous
next →
201–300 of 697, ranked by callers