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
↓ 3 callers
Method
Description
()
config/http_config.go:772
↓ 3 callers
Method
Equal
(o *HistogramBucket)
model/value_histogram.go:85
↓ 3 callers
Function
Negotiate
Negotiate returns the Content-Type based on the given Accept header. If no appropriate accepted type is found, FmtText is returned (which is the Prome
expfmt/encode.go:120
↓ 3 callers
Function
NegotiateIncludingOpenMetrics
NegotiateIncludingOpenMetrics works like Negotiate but includes all stable FmtOpenMetrics formats as an option for the result. Deprecated: Use Negoti
expfmt/encode.go:129
↓ 3 callers
Function
NewAuthorizationCredentialsRoundTripper
NewAuthorizationCredentialsRoundTripper adds the authorization credentials read from the provided SecretReader to a request unless the authorization h
config/http_config.go:868
↓ 3 callers
Function
NewFileSecret
(file string)
config/http_config.go:800
↓ 3 callers
Function
NewHeadersRoundTripper
NewHeadersRoundTripper returns a RoundTripper that sets HTTP headers on requests as configured.
config/headers.go:98
↓ 3 callers
Function
NewTLSRoundTripperWithContext
( ctx context.Context, cfg *tls.Config, settings TLSRoundTripperSettings, newRT func(*tls.Config) (http.Ro
config/http_config.go:1511
↓ 3 callers
Method
Proxy
Proxy returns the Proxy URL for a request.
config/http_config.go:1715
↓ 3 callers
Method
Resolved
Resolved returns true iff the activity interval ended in the past.
model/alert.go:64
↓ 3 callers
Method
Set
Set implements the pflag.Value interface.
model/metric.go:138
↓ 3 callers
Method
SetDirectory
SetDirectory joins any relative file paths with dir. Any paths that are empty or absolute remain unchanged.
config/config.go:70
↓ 3 callers
Method
String
String returns the current level.
promslog/slog.go:85
↓ 3 callers
Method
String
String returns the string representation of s.
model/metric.go:82
↓ 3 callers
Method
Time
Time returns the time.Time representation of t.
model/time.go:95
↓ 3 callers
Method
Validate
Validate checks whether the alert data is inconsistent.
model/alert.go:91
↓ 3 callers
Method
WriteRune
(r rune)
expfmt/text_create.go:34
↓ 3 callers
Function
extractMetricNameNode
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_parse.go:939
↓ 3 callers
Function
extractNameAndLabels
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_parse.go:951
↓ 3 callers
Function
isCount
(name string)
expfmt/text_parse.go:966
↓ 3 callers
Function
isSum
(name string)
expfmt/text_parse.go:970
↓ 3 callers
Function
isValidLabelNameStart
(b byte)
expfmt/text_parse.go:946
↓ 3 callers
Function
labelSetToFingerprint
labelSetToFingerprint works exactly as LabelsToSignature but takes a LabelSet as parameter (rather than a label map) and returns a Fingerprint.
model/signature.go:54
↓ 3 callers
Function
newTestOAuthServer
newTestOAuthServer returns a new test server with the expected base64 encoded client ID and secret.
config/http_config_test.go:1806
↓ 3 callers
Function
parseTimestampToProto
(s string)
expfmt/openmetrics_parse.go:1035
↓ 3 callers
Method
readTokenUntilNewline
readTokenUntilNewline copies bytes from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). The fi
expfmt/text_parse.go:732
↓ 3 callers
Method
readTokenUntilWhitespace
readTokenUntilWhitespace copies bytes from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte). The
expfmt/text_parse.go:718
↓ 3 callers
Function
requireEqualFamilies
(t *testing.T, expected, actual map[string]*dto.MetricFamily)
expfmt/openmetrics_2_0_parse_test.go:50
↓ 3 callers
Method
setOrCreateCurrentMF
()
expfmt/text_parse.go:903
↓ 3 callers
Function
testDecodeErrorParity
(t *testing.T, input string, newObj func() T)
model/util127_test.go:87
↓ 3 callers
Function
testDecodeSuccessParity
(t *testing.T, input string, newObj func() T)
model/util127_test.go:67
↓ 3 callers
Function
testRoundTrip
(t *testing.T, name string, v any)
model/util127_test.go:43
↓ 3 callers
Method
tokenURL
()
config/http_config_test.go:1841
↓ 3 callers
Method
url
()
config/http_config_test.go:1837
↓ 2 callers
Method
After
After reports whether the Time t is after o.
model/time.go:80
↓ 2 callers
Function
ComponentUserAgent
(component string)
version/info.go:115
↓ 2 callers
Function
ConvertToFloat
(i any)
helpers/templates/time.go:28
↓ 2 callers
Function
DefaultAcceptedFormats
DefaultAcceptedFormats returns a copy of standard accepted formats for Negotiate, ordered by preference (delimited protobuf, protobuf text, compact pr
expfmt/encode.go:75
↓ 2 callers
Function
DefaultOpenMetricsAcceptedFormats
DefaultOpenMetricsAcceptedFormats returns a copy of standard accepted formats including stable OpenMetrics formats, ordered by preference.
expfmt/encode.go:81
↓ 2 callers
Function
EncodeCertificate
(w io.Writer, cert *x509.Certificate)
config/generate.go:41
↓ 2 callers
Method
Equal
Equal compares first the metrics, then the timestamp, then the value. The semantics of value equality is defined by SampleValue.Equal.
model/value.go:43
↓ 2 callers
Function
EscapeMetricFamily
EscapeMetricFamily escapes the given metric names and labels with the given escaping scheme. Returns a new object that uses the same pointers to field
model/metric.go:327
↓ 2 callers
Function
EscapeName
EscapeName escapes the incoming name according to the provided escaping scheme. Depending on the rules of escaping, this may cause no change in the st
model/metric.go:405
↓ 2 callers
Function
FinalizeOpenMetrics
FinalizeOpenMetrics writes the final `# EOF\n` line required by OpenMetrics.
expfmt/openmetrics_create.go:387
↓ 2 callers
Method
GetProxyConnectHeader
ProxyConnectHeader() return the Proxy Connext Headers.
config/http_config.go:1751
↓ 2 callers
Function
GetRevision
()
version/info.go:100
↓ 2 callers
Function
GetTags
()
version/info.go:107
↓ 2 callers
Method
HTTPHeader
()
config/config.go:44
↓ 2 callers
Function
HumanizeDuration
(i any)
helpers/templates/time.go:61
↓ 2 callers
Function
HumanizeTimestamp
(i any)
helpers/templates/time.go:108
↓ 2 callers
Method
Immutable
()
config/http_config.go:773
↓ 2 callers
Function
LoadTLSConfig
LoadTLSConfig parses the given file into a tls.Config.
config/tls_config_test.go:33
↓ 2 callers
Method
MarshalJSON
MarshalJSON implements the json.Marshaler interface.
model/time.go:120
↓ 2 callers
Method
Name
Name returns the name of the alert. It is equivalent to the "alertname" label.
model/alert.go:45
↓ 2 callers
Function
NewFormat
NewFormat creates a new Format.
promslog/slog.go:124
↓ 2 callers
Function
NewNopLogger
NewNopLogger is a convenience function to return an slog.Logger that discards all log records.
promslog/slog.go:287
↓ 2 callers
Function
NewRoundTripCheckRequest
NewRoundTripCheckRequest creates a new instance of a type that implements http.RoundTripper, which before returning theResponse and theError, executes
config/http_config_test.go:1785
↓ 2 callers
Function
NewUserAgentRoundTripper
NewUserAgentRoundTripper adds the user agent every request header.
config/http_config.go:1638
↓ 2 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
↓ 2 callers
Function
SerialNumber
()
config/generate.go:66
↓ 2 callers
Method
StatusAt
StatusAt returns the status of the alert at the given timestamp.
model/alert.go:83
↓ 2 callers
Function
TimeFromUnix
TimeFromUnix returns the Time equivalent to the Unix Time t provided in seconds.
model/time.go:59
↓ 2 callers
Function
UnescapeName
UnescapeName unescapes the incoming name according to the provided escaping scheme if possible. Some schemes are partially or totally non-roundtripabl
model/metric.go:473
↓ 2 callers
Method
UnmarshalJSON
UnmarshalJSON implements the json.Unmarshaler interface.
model/time.go:125
↓ 2 callers
Method
Validate
Validate validates the Headers config.
config/headers.go:73
↓ 2 callers
Method
Validate
Validate validates the HTTPClientConfig to check only one of BearerToken, BasicAuth and BearerTokenFile is configured. It also validates that ProxyURL
config/http_config.go:389
↓ 2 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
↓ 2 callers
Function
WithDialContextFunc
WithDialContextFunc allows you to override the func gets used for the dialing. The default is `net.Dialer.DialContext`.
config/http_config.go:521
↓ 2 callers
Method
WithInstrumentation
WithInstrumentation returns a router with instrumentation support.
route/route.go:60
↓ 2 callers
Method
applyToHTTPClientOptions
(options *httpClientOptions)
config/http_config.go:510
↓ 2 callers
Function
containsRawNewline
(s string)
expfmt/openmetrics_2_0_create.go:1151
↓ 2 callers
Function
extractFirstRuleText
(input []byte, node *goabnf.ParseTree, rule string)
expfmt/openmetrics_2_0_parse.go:1296
↓ 2 callers
Function
extractSampleMetricName
(input []byte, sampleNode *goabnf.ParseTree)
expfmt/openmetrics_parse.go:929
↓ 2 callers
Function
extractSamples
(f *dto.MetricFamily, o *DecodeOptions)
expfmt/decode.go:292
↓ 2 callers
Function
extractSingleLabel
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_parse.go:985
↓ 2 callers
Function
formatABNFLineParseError
(lineNum int, perr *goabnf.ParseError)
expfmt/openmetrics_parse.go:1121
↓ 2 callers
Method
getTLSDataWithHash
(ctx context.Context)
config/http_config.go:1536
↓ 2 callers
Method
immutable
()
config/http_config.go:1499
↓ 2 callers
Function
isDomainOrSubdomain
isDomainOrSubdomain reports whether sub is a subdomain (or exact match) of parent. It mirrors isDomainOrSubdomain from net/http/client.go.
config/http_config.go:1217
↓ 2 callers
Function
isEmptyNonNilURL
checks if u equals to &url.URL{}.
config/http_config_test.go:2241
↓ 2 callers
Function
isOpenMetrics20Version
(v string)
expfmt/expfmt.go:136
↓ 2 callers
Function
isValidLabelNameContinuation
(b byte, quoted bool)
expfmt/text_parse.go:950
↓ 2 callers
Function
isValidLegacyRune
(b rune, i int)
model/metric.go:548
↓ 2 callers
Function
matchFamilySample
(st *openMetricsFamilyState, sampleName string)
expfmt/openmetrics_parse.go:516
↓ 2 callers
Method
next
next reads from the input stream until the next MetricFamily is complete and populates v, or returns io.EOF when # EOF is reached.
expfmt/openmetrics_parse.go:249
↓ 2 callers
Function
nonZeroCount
nonZeroCount returns the amount of values that are non-zero.
config/http_config.go:375
↓ 2 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
↓ 2 callers
Method
parseExemplar
(input []byte, node *goabnf.ParseTree, isOM1 bool)
expfmt/openmetrics_parse.go:857
↓ 2 callers
Function
parseFloat
(s string)
expfmt/text_parse.go:1002
↓ 2 callers
Function
parsePlainInt64
(s string)
expfmt/openmetrics_2_0_parse.go:1332
↓ 2 callers
Function
parsePlainUint64
(s string)
expfmt/openmetrics_2_0_parse.go:1320
↓ 2 callers
Function
parseSampleTimestampMs
(s string)
expfmt/openmetrics_parse.go:1023
↓ 2 callers
Function
readFile
(t *testing.T, filename string)
config/http_config_test.go:2667
↓ 2 callers
Method
readTokenAsMetricName
readTokenAsMetricName copies a metric name from p.buf into p.currentToken. The first byte considered is the byte already read (now in p.currentByte).
expfmt/text_parse.go:767
↓ 2 callers
Method
reset
(in io.Reader)
expfmt/text_parse.go:172
↓ 2 callers
Method
roundTripperSettings
(secretManager SecretManager)
config/http_config.go:1410
↓ 2 callers
Method
skipBlankTabIfCurrentBlankTab
skipBlankTabIfCurrentBlankTab works exactly as skipBlankTab but doesn't do anything if p.currentByte is neither ' ' nor '\t'.
expfmt/text_parse.go:708
↓ 2 callers
Function
testDiscriminatorHTTPHeader
(t testing.TB)
expfmt/decode_test.go:429
↓ 2 callers
Function
testLabelNames
(t testing.TB)
model/labels_test.go:22
↓ 2 callers
Function
testLabelValues
(t testing.TB)
model/labels_test.go:58
← previous
next →
101–200 of 800, ranked by callers