MCPcopy Create free account

hub / github.com/prometheus/common / functions

Functions800 in github.com/prometheus/common

↓ 3 callersMethodDescription
()
config/http_config.go:772
↓ 3 callersMethodEqual
(o *HistogramBucket)
model/value_histogram.go:85
↓ 3 callersFunctionNegotiate
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 callersFunctionNegotiateIncludingOpenMetrics
NegotiateIncludingOpenMetrics works like Negotiate but includes all stable FmtOpenMetrics formats as an option for the result. Deprecated: Use Negoti
expfmt/encode.go:129
↓ 3 callersFunctionNewAuthorizationCredentialsRoundTripper
NewAuthorizationCredentialsRoundTripper adds the authorization credentials read from the provided SecretReader to a request unless the authorization h
config/http_config.go:868
↓ 3 callersFunctionNewFileSecret
(file string)
config/http_config.go:800
↓ 3 callersFunctionNewHeadersRoundTripper
NewHeadersRoundTripper returns a RoundTripper that sets HTTP headers on requests as configured.
config/headers.go:98
↓ 3 callersFunctionNewTLSRoundTripperWithContext
( ctx context.Context, cfg *tls.Config, settings TLSRoundTripperSettings, newRT func(*tls.Config) (http.Ro
config/http_config.go:1511
↓ 3 callersMethodProxy
Proxy returns the Proxy URL for a request.
config/http_config.go:1715
↓ 3 callersMethodResolved
Resolved returns true iff the activity interval ended in the past.
model/alert.go:64
↓ 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:70
↓ 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 callersMethodValidate
Validate checks whether the alert data is inconsistent.
model/alert.go:91
↓ 3 callersMethodWriteRune
(r rune)
expfmt/text_create.go:34
↓ 3 callersFunctionextractMetricNameNode
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_parse.go:939
↓ 3 callersFunctionextractNameAndLabels
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_parse.go:951
↓ 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
↓ 3 callersFunctionparseTimestampToProto
(s string)
expfmt/openmetrics_parse.go:1035
↓ 3 callersMethodreadTokenUntilNewline
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 callersMethodreadTokenUntilWhitespace
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 callersFunctionrequireEqualFamilies
(t *testing.T, expected, actual map[string]*dto.MetricFamily)
expfmt/openmetrics_2_0_parse_test.go:50
↓ 3 callersMethodsetOrCreateCurrentMF
()
expfmt/text_parse.go:903
↓ 3 callersFunctiontestDecodeErrorParity
(t *testing.T, input string, newObj func() T)
model/util127_test.go:87
↓ 3 callersFunctiontestDecodeSuccessParity
(t *testing.T, input string, newObj func() T)
model/util127_test.go:67
↓ 3 callersFunctiontestRoundTrip
(t *testing.T, name string, v any)
model/util127_test.go:43
↓ 3 callersMethodtokenURL
()
config/http_config_test.go:1841
↓ 3 callersMethodurl
()
config/http_config_test.go:1837
↓ 2 callersMethodAfter
After reports whether the Time t is after o.
model/time.go:80
↓ 2 callersFunctionComponentUserAgent
(component string)
version/info.go:115
↓ 2 callersFunctionConvertToFloat
(i any)
helpers/templates/time.go:28
↓ 2 callersFunctionDefaultAcceptedFormats
DefaultAcceptedFormats returns a copy of standard accepted formats for Negotiate, ordered by preference (delimited protobuf, protobuf text, compact pr
expfmt/encode.go:75
↓ 2 callersFunctionDefaultOpenMetricsAcceptedFormats
DefaultOpenMetricsAcceptedFormats returns a copy of standard accepted formats including stable OpenMetrics formats, ordered by preference.
expfmt/encode.go:81
↓ 2 callersFunctionEncodeCertificate
(w io.Writer, cert *x509.Certificate)
config/generate.go:41
↓ 2 callersMethodEqual
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 callersFunctionEscapeMetricFamily
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 callersFunctionEscapeName
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 callersFunctionFinalizeOpenMetrics
FinalizeOpenMetrics writes the final `# EOF\n` line required by OpenMetrics.
expfmt/openmetrics_create.go:387
↓ 2 callersMethodGetProxyConnectHeader
ProxyConnectHeader() return the Proxy Connext Headers.
config/http_config.go:1751
↓ 2 callersFunctionGetRevision
()
version/info.go:100
↓ 2 callersFunctionGetTags
()
version/info.go:107
↓ 2 callersMethodHTTPHeader
()
config/config.go:44
↓ 2 callersFunctionHumanizeDuration
(i any)
helpers/templates/time.go:61
↓ 2 callersFunctionHumanizeTimestamp
(i any)
helpers/templates/time.go:108
↓ 2 callersMethodImmutable
()
config/http_config.go:773
↓ 2 callersFunctionLoadTLSConfig
LoadTLSConfig parses the given file into a tls.Config.
config/tls_config_test.go:33
↓ 2 callersMethodMarshalJSON
MarshalJSON implements the json.Marshaler interface.
model/time.go:120
↓ 2 callersMethodName
Name returns the name of the alert. It is equivalent to the "alertname" label.
model/alert.go:45
↓ 2 callersFunctionNewFormat
NewFormat creates a new Format.
promslog/slog.go:124
↓ 2 callersFunctionNewNopLogger
NewNopLogger is a convenience function to return an slog.Logger that discards all log records.
promslog/slog.go:287
↓ 2 callersFunctionNewRoundTripCheckRequest
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 callersFunctionNewUserAgentRoundTripper
NewUserAgentRoundTripper adds the user agent every request header.
config/http_config.go:1638
↓ 2 callersFunctionResponseFormat
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 callersFunctionSerialNumber
()
config/generate.go:66
↓ 2 callersMethodStatusAt
StatusAt returns the status of the alert at the given timestamp.
model/alert.go:83
↓ 2 callersFunctionTimeFromUnix
TimeFromUnix returns the Time equivalent to the Unix Time t provided in seconds.
model/time.go:59
↓ 2 callersFunctionUnescapeName
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 callersMethodUnmarshalJSON
UnmarshalJSON implements the json.Unmarshaler interface.
model/time.go:125
↓ 2 callersMethodValidate
Validate validates the Headers config.
config/headers.go:73
↓ 2 callersMethodValidate
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 callersFunctionWithCreatedLines
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 callersFunctionWithDialContextFunc
WithDialContextFunc allows you to override the func gets used for the dialing. The default is `net.Dialer.DialContext`.
config/http_config.go:521
↓ 2 callersMethodWithInstrumentation
WithInstrumentation returns a router with instrumentation support.
route/route.go:60
↓ 2 callersMethodapplyToHTTPClientOptions
(options *httpClientOptions)
config/http_config.go:510
↓ 2 callersFunctioncontainsRawNewline
(s string)
expfmt/openmetrics_2_0_create.go:1151
↓ 2 callersFunctionextractFirstRuleText
(input []byte, node *goabnf.ParseTree, rule string)
expfmt/openmetrics_2_0_parse.go:1296
↓ 2 callersFunctionextractSampleMetricName
(input []byte, sampleNode *goabnf.ParseTree)
expfmt/openmetrics_parse.go:929
↓ 2 callersFunctionextractSamples
(f *dto.MetricFamily, o *DecodeOptions)
expfmt/decode.go:292
↓ 2 callersFunctionextractSingleLabel
(input []byte, node *goabnf.ParseTree)
expfmt/openmetrics_parse.go:985
↓ 2 callersFunctionformatABNFLineParseError
(lineNum int, perr *goabnf.ParseError)
expfmt/openmetrics_parse.go:1121
↓ 2 callersMethodgetTLSDataWithHash
(ctx context.Context)
config/http_config.go:1536
↓ 2 callersMethodimmutable
()
config/http_config.go:1499
↓ 2 callersFunctionisDomainOrSubdomain
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 callersFunctionisEmptyNonNilURL
checks if u equals to &url.URL{}.
config/http_config_test.go:2241
↓ 2 callersFunctionisOpenMetrics20Version
(v string)
expfmt/expfmt.go:136
↓ 2 callersFunctionisValidLabelNameContinuation
(b byte, quoted bool)
expfmt/text_parse.go:950
↓ 2 callersFunctionisValidLegacyRune
(b rune, i int)
model/metric.go:548
↓ 2 callersFunctionmatchFamilySample
(st *openMetricsFamilyState, sampleName string)
expfmt/openmetrics_parse.go:516
↓ 2 callersMethodnext
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 callersFunctionnonZeroCount
nonZeroCount returns the amount of values that are non-zero.
config/http_config.go:375
↓ 2 callersFunctionnormalizeHistogram
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 callersMethodparseExemplar
(input []byte, node *goabnf.ParseTree, isOM1 bool)
expfmt/openmetrics_parse.go:857
↓ 2 callersFunctionparseFloat
(s string)
expfmt/text_parse.go:1002
↓ 2 callersFunctionparsePlainInt64
(s string)
expfmt/openmetrics_2_0_parse.go:1332
↓ 2 callersFunctionparsePlainUint64
(s string)
expfmt/openmetrics_2_0_parse.go:1320
↓ 2 callersFunctionparseSampleTimestampMs
(s string)
expfmt/openmetrics_parse.go:1023
↓ 2 callersFunctionreadFile
(t *testing.T, filename string)
config/http_config_test.go:2667
↓ 2 callersMethodreadTokenAsMetricName
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 callersMethodreset
(in io.Reader)
expfmt/text_parse.go:172
↓ 2 callersMethodroundTripperSettings
(secretManager SecretManager)
config/http_config.go:1410
↓ 2 callersMethodskipBlankTabIfCurrentBlankTab
skipBlankTabIfCurrentBlankTab works exactly as skipBlankTab but doesn't do anything if p.currentByte is neither ' ' nor '\t'.
expfmt/text_parse.go:708
↓ 2 callersFunctiontestDiscriminatorHTTPHeader
(t testing.TB)
expfmt/decode_test.go:429
↓ 2 callersFunctiontestLabelNames
(t testing.TB)
model/labels_test.go:22
↓ 2 callersFunctiontestLabelValues
(t testing.TB)
model/labels_test.go:58
← previousnext →101–200 of 800, ranked by callers