MCPcopy Create free account

hub / github.com/prometheus/common / functions

Functions697 in github.com/prometheus/common

↓ 71 callersMethodString
()
model/value_type.go:24
↓ 46 callersMethodError
Error implements the error interface.
expfmt/text_parse.go:47
↓ 46 callersMethodGet
Get registers a new GET route.
route/route.go:93
↓ 38 callersMethodEqual
Equal reports whether two Times represent the same instant.
model/time.go:70
↓ 26 callersMethodClose
()
expfmt/encode.go:61
↓ 26 callersFunctionNewClientFromConfig
NewClientFromConfig returns a new HTTP client configured for the given config.HTTPClientConfig and config.HTTPClientOption. The name is used as go-con
config/http_config.go:606
↓ 22 callersMethodAdd
Add returns the Time t + d.
model/time.go:85
↓ 21 callersMethodWriteByte
(c byte)
expfmt/text_create.go:36
↓ 16 callersMethodSet
Set updates the logging level with the validation.
promslog/slog.go:101
↓ 14 callersFunctionLoadHTTPConfigFile
LoadHTTPConfigFile parses the given YAML file into a HTTPClientConfig.
config/http_config.go:319
↓ 14 callersMethodWriteString
(s string)
expfmt/text_create.go:35
↓ 14 callersMethodparseError
parseError sets p.err to a ParseError at the current line with the given message.
expfmt/text_parse.go:689
↓ 13 callersMethodFetch
(ctx context.Context)
config/http_config.go:772
↓ 10 callersMethodRedirect
Redirect takes an absolute path and sends an internal HTTP redirect for it, prefixed by the router's path prefix. Note that this method does not inclu
route/route.go:130
↓ 9 callersMethodCloseIdleConnections
()
config/http_config.go:68
↓ 9 callersMethodPut
Put registers a new PUT route.
route/route.go:108
↓ 9 callersMethodServeHTTP
ServeHTTP implements http.Handler.
route/route.go:135
↓ 8 callersMethodIsValid
IsValid returns true iff the name matches the pattern of LabelNameRE when NameValidationScheme is set to LegacyValidation, or valid UTF-8 if NameValid
model/labels.go:112
↓ 8 callersMethodIsValidMetricName
IsValidMetricName returns whether metricName is valid according to s.
model/metric.go:153
↓ 8 callersFunctionParseDuration
ParseDuration parses a string into a time.Duration, assuming that a year always has 365d, a week always has 7d, and a day always has 24h. Negative dur
model/time.go:227
↓ 8 callersFunctionTimeFromUnixNano
TimeFromUnixNano returns the Time equivalent to the Unix Time t provided in nanoseconds.
model/time.go:65
↓ 7 callersMethodBefore
Before reports whether the Time t is before o.
model/time.go:75
↓ 7 callersFunctionNew
New returns a new Router.
route/route.go:53
↓ 7 callersMethodhandle
handle turns a HandlerFunc into an httprouter.Handle.
route/route.go:76
↓ 7 callersFunctionnewTestServer
(handler func(w http.ResponseWriter, r *http.Request))
config/http_config_test.go:146
↓ 6 callersMethodDecode
(*dto.MetricFamily)
expfmt/decode.go:32
↓ 6 callersMethodEncode
(*dto.MetricFamily)
expfmt/encode.go:50
↓ 6 callersFunctionJoinDir
JoinDir joins dir and path if path is relative. If path is empty or absolute, it is returned unchanged.
config/config.go:96
↓ 6 callersFunctionNew
New returns a new slog.Logger. Each logged line will be annotated with a timestamp. The output always goes to stderr.
promslog/slog.go:260
↓ 6 callersFunctionNewRoundTripperFromConfig
NewRoundTripperFromConfig returns a new HTTP RoundTripper configured for the given config.HTTPClientConfig and config.HTTPClientOption. The name is us
config/http_config.go:623
↓ 6 callersMethodRoundTrip
RoundTrip implements the http.RoundTrip interface.
config/http_config.go:1575
↓ 6 callersMethodTextToMetricFamilies
TextToMetricFamilies reads 'in' as the simple and flat text-based exchange format and creates MetricFamily proto messages. It returns the MetricFamily
expfmt/text_parse.go:116
↓ 6 callersFunctioncloneRequest
cloneRequest returns a clone of the provided *http.Request. The clone is a shallow copy of the struct and its Header map.
config/http_config.go:1239
↓ 6 callersFunctionhashNew
hashNew initializes a new fnv64a hash value.
model/fnv.go:24
↓ 6 callersMethodskipBlankTab
skipBlankTab reads (and discards) bytes from p.buf until it encounters a byte that is neither ' ' nor '\t'. That byte is left in p.currentByte.
expfmt/text_parse.go:698
↓ 6 callersFunctionwriteEscapedString
(w enhancedWriter, v string, includeDoubleQuote bool)
expfmt/text_create.go:466
↓ 6 callersFunctionwriteOpenMetricsFloat
writeOpenMetricsFloat works like writeFloat but appends ".0" if the resulting number would otherwise contain neither a "." nor an "e".
expfmt/openmetrics_create.go:655
↓ 5 callersMethodIsValidLabelName
IsValidLabelName returns whether labelName is valid according to s.
model/metric.go:176
↓ 5 callersFunctionMetricFamilyToOpenMetrics20
MetricFamilyToOpenMetrics20 converts a MetricFamily proto message into the OpenMetrics text format version 2.0.0 and writes the resulting lines to 'ou
expfmt/openmetrics_2_0_create.go:39
↓ 5 callersFunctionMetricFamilyToText
MetricFamilyToText converts a MetricFamily proto message into text format and writes the resulting lines to 'out'. It returns the number of bytes writ
expfmt/text_create.go:78
↓ 5 callersFunctionNewLevel
NewLevel returns a new Level.
promslog/slog.go:58
↓ 5 callersFunctionNewTLSConfig
NewTLSConfig creates a new tls.Config from the given TLSConfig.
config/http_config.go:1258
↓ 5 callersFunctionParam
Param returns param p for the context, or the empty string when param does not exist in context.
route/route.go:32
↓ 5 callersMethodString
()
model/time.go:294
↓ 5 callersMethodValidate
Validate validates the TLSConfig to check that only one of the inlined or file-based fields for the TLS CA, client certificate, and client key are use
config/http_config.go:1378
↓ 5 callersFunctiongenSampleHistogram
()
model/value_histogram_test.go:258
↓ 5 callersFunctionhashAdd
hashAdd adds a string to a fnv64a hash value, returning the updated hash.
model/fnv.go:29
↓ 5 callersFunctionhashAddByte
hashAddByte adds a byte to a fnv64a hash value, returning the updated hash.
model/fnv.go:38
↓ 5 callersFunctionwriteName
writeName writes a string as-is if it complies with the legacy naming scheme, or escapes it in double quotes if not.
expfmt/text_create.go:512
↓ 5 callersFunctionwriteOpenMetricsNameAndLabelPairs
writeOpenMetricsNameAndLabelPairs works like writeOpenMetricsSample but formats the float in OpenMetrics style.
expfmt/openmetrics_create.go:457
↓ 4 callersMethodFingerprint
Fingerprint returns a unique hash for the alert. It is equivalent to the fingerprint of the alert's label set.
model/alert.go:51
↓ 4 callersMethodFormatType
FormatType deduces an overall FormatType for the given format.
expfmt/expfmt.go:155
↓ 4 callersFunctionIsValidLegacyMetricName
IsValidLegacyMetricName is similar to IsValidMetricName but always uses the legacy validation scheme regardless of the value of NameValidationScheme.
model/metric.go:319
↓ 4 callersFunctionLabelsToSignature
LabelsToSignature returns a quasi-unique signature (i.e., fingerprint) for a given label set. (Collisions are possible but unlikely if the number of l
model/signature.go:31
↓ 4 callersMethodLen
()
model/value.go:315
↓ 4 callersFunctionMetricFamilyToOpenMetrics
MetricFamilyToOpenMetrics converts a MetricFamily proto message into the OpenMetrics text format and writes the resulting lines to 'out'. It returns t
expfmt/openmetrics_create.go:98
↓ 4 callersFunctionNegotiateAccept
NegotiateAccept returns the Content-Type based on the given Accept header and the list of accepted Formats provided by the caller, in order of prefere
expfmt/encode.go:101
↓ 4 callersFunctionNewDecoder
NewDecoder returns a new decoder based on the given input format. Metric names are validated based on the provided Format -- if the format requires es
expfmt/decode.go:85
↓ 4 callersFunctionNewEncoder
NewEncoder returns a new encoder based on content type negotiation. All Encoder implementations returned by NewEncoder also implement Closer, and call
expfmt/encode.go:188
↓ 4 callersFunctionNewInlineSecret
(text string)
config/http_config.go:781
↓ 4 callersFunctionNewOAuth2RoundTripper
NewOAuth2RoundTripper returns a round tripper that performs OAuth2 authentication. The opts variadic parameter accepts any HTTPClientOption (e.g. With
config/http_config.go:959
↓ 4 callersFunctionNewTextParser
NewTextParser returns a new TextParser with the provided nameValidationScheme.
expfmt/text_parse.go:89
↓ 4 callersMethodResolvedAt
ResolvedAt returns true iff the activity interval ended before the given timestamp.
model/alert.go:70
↓ 4 callersMethodUnix
Unix returns t as a Unix time, the number of seconds elapsed since January 1, 1970 UTC.
model/time.go:101
↓ 4 callersMethodUnixNano
UnixNano returns t as a Unix time, the number of nanoseconds elapsed since January 1, 1970 UTC.
model/time.go:107
↓ 4 callersFunctionWithSecretManager
WithSecretManager allows setting the secret manager.
config/http_config.go:592
↓ 4 callersFunctionbenchmarkLabelToSignature
(b *testing.B, l map[string]string, e uint64)
model/signature_test.go:191
↓ 4 callersFunctionbenchmarkMetricToFastFingerprint
(b *testing.B, ls LabelSet, e Fingerprint)
model/signature_test.go:237
↓ 4 callersFunctionbenchmarkMetricToFastFingerprintConc
(b *testing.B, ls LabelSet, e Fingerprint, concLevel int)
model/signature_test.go:278
↓ 4 callersFunctionbenchmarkMetricToFingerprint
(b *testing.B, ls LabelSet, e Fingerprint)
model/signature_test.go:214
↓ 4 callersMethodclose
()
config/http_config_test.go:1845
↓ 4 callersFunctiongetCertificateBlobs
(t *testing.T)
config/http_config_test.go:1012
↓ 4 callersFunctionisBlankOrTab
(b byte)
expfmt/text_parse.go:962
↓ 4 callersFunctionisCrossHostRedirect
isCrossHostRedirect reports whether req is a redirect that has left the original request's host at any point in the chain. It detects this by walking
config/http_config.go:1159
↓ 4 callersFunctionlabelSetToFastFingerprint
labelSetToFastFingerprint works similar to labelSetToFingerprint but uses a faster and less allocation-heavy hash function, which is more susceptible
model/signature.go:78
↓ 4 callersFunctiontoSecret
toSecret returns a SecretReader from one of the given sources, assuming exactly one or none of the sources are provided.
config/http_config.go:841
↓ 4 callersFunctionwriteCertificate
(bs map[string][]byte, src, dst string)
config/http_config_test.go:1033
↓ 3 callersMethodClone
Clone returns a copy of the Metric.
model/metric.go:260
↓ 3 callersMethodDescription
()
config/http_config.go:773
↓ 3 callersMethodEqual
(o *HistogramBucket)
model/value_histogram.go:85
↓ 3 callersFunctionNewAuthorizationCredentialsRoundTripper
NewAuthorizationCredentialsRoundTripper adds the authorization credentials read from the provided SecretReader to a request unless the authorization h
config/http_config.go:869
↓ 3 callersFunctionNewFileSecret
(file string)
config/http_config.go:801
↓ 3 callersFunctionNewTLSRoundTripperWithContext
( ctx context.Context, cfg *tls.Config, settings TLSRoundTripperSettings, newRT func(*tls.Config) (http.Ro
config/http_config.go:1507
↓ 3 callersMethodProxy
Proxy returns the Proxy URL for a request.
config/http_config.go:1711
↓ 3 callersMethodResolved
Resolved returns true iff the activity interval ended in the past.
model/alert.go:64
↓ 3 callersMethodRoundTrip
(*http.Request)
config/http_config_test.go:1769
↓ 3 callersMethodSet
Set implements the pflag.Value interface.
model/metric.go:138
↓ 3 callersMethodSetDirectory
SetDirectory joins any relative file paths with dir. Any paths that are empty or absolute remain unchanged.
config/config.go:91
↓ 3 callersMethodString
String returns the current level.
promslog/slog.go:85
↓ 3 callersMethodString
String returns the string representation of s.
model/metric.go:82
↓ 3 callersMethodTime
Time returns the time.Time representation of t.
model/time.go:95
↓ 3 callersMethodToEscapingScheme
ToEscapingScheme returns an EscapingScheme depending on the Format. Iff the Format contains a escaping=allow-utf-8 term, it will select NoEscaping. If
expfmt/expfmt.go:207
↓ 3 callersMethodValidate
Validate checks whether the alert data is inconsistent.
model/alert.go:91
↓ 3 callersMethodWithEscapingScheme
WithEscapingScheme returns a copy of Format with the specified escaping scheme appended to the end. If an escaping scheme already exists it is removed
expfmt/expfmt.go:134
↓ 3 callersMethodWriteRune
(r rune)
expfmt/text_create.go:34
↓ 3 callersFunctionisCount
(name string)
expfmt/text_parse.go:966
↓ 3 callersFunctionisSum
(name string)
expfmt/text_parse.go:970
↓ 3 callersFunctionisValidLabelNameStart
(b byte)
expfmt/text_parse.go:946
↓ 3 callersFunctionlabelSetToFingerprint
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 callersFunctionnewTestOAuthServer
newTestOAuthServer returns a new test server with the expected base64 encoded client ID and secret.
config/http_config_test.go:1806
next →1–100 of 697, ranked by callers