MCPcopy Create free account

hub / github.com/prometheus/common / functions

Functions697 in github.com/prometheus/common

↓ 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 callersMethodsetOrCreateCurrentMF
()
expfmt/text_parse.go:903
↓ 3 callersMethodtokenURL
()
config/http_config_test.go:1841
↓ 3 callersMethodurl
()
config/http_config_test.go:1837
↓ 3 callersFunctionwriteProtoTimestamp
(w enhancedWriter, ts *timestamppb.Timestamp)
expfmt/openmetrics_2_0_create.go:390
↓ 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 callersMethodDecode
Decode calls the Decode method of the wrapped Decoder and then extracts the samples from the decoded MetricFamily into the provided model.Vector.
expfmt/decode.go:191
↓ 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 callersMethodGetProxyConnectHeader
ProxyConnectHeader() return the Proxy Connext Headers.
config/http_config.go:1747
↓ 2 callersFunctionGetRevision
()
version/info.go:100
↓ 2 callersFunctionGetTags
()
version/info.go:107
↓ 2 callersMethodHTTPHeader
()
config/config.go:65
↓ 2 callersFunctionHumanizeDuration
(i any)
helpers/templates/time.go:61
↓ 2 callersFunctionHumanizeTimestamp
(i any)
helpers/templates/time.go:108
↓ 2 callersMethodImmutable
()
config/http_config.go:774
↓ 2 callersFunctionLoadTLSConfig
LoadTLSConfig parses the given file into a tls.Config.
config/tls_config_test.go:33
↓ 2 callersMethodName
Name returns the name of the alert. It is equivalent to the "alertname" label.
model/alert.go:45
↓ 2 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:83
↓ 2 callersFunctionNegotiateIncludingOpenMetrics
NegotiateIncludingOpenMetrics works like Negotiate but includes FmtOpenMetrics as an option for the result. Deprecated: Use NegotiateAccept(h, FmtOpe
expfmt/encode.go:92
↓ 2 callersFunctionNewFormat
NewFormat creates a new Format.
promslog/slog.go:124
↓ 2 callersFunctionNewHeadersRoundTripper
NewHeadersRoundTripper returns a RoundTripper that sets HTTP headers on requests as configured.
config/headers.go:98
↓ 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:1634
↓ 2 callersFunctionNow
Now returns the current time as a Time.
model/time.go:53
↓ 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:391
↓ 2 callersFunctionWithDialContextFunc
WithDialContextFunc allows you to override the func gets used for the dialing. The default is `net.Dialer.DialContext`.
config/http_config.go:523
↓ 2 callersMethodWithInstrumentation
WithInstrumentation returns a router with instrumentation support.
route/route.go:60
↓ 2 callersMethodapplyToHTTPClientOptions
(options *httpClientOptions)
config/http_config.go:512
↓ 2 callersFunctioncontainsRawNewline
(s string)
expfmt/openmetrics_2_0_create.go:376
↓ 2 callersFunctionextractSamples
(f *dto.MetricFamily, o *DecodeOptions)
expfmt/decode.go:220
↓ 2 callersMethodgetTLSDataWithHash
(ctx context.Context)
config/http_config.go:1532
↓ 2 callersMethodimmutable
()
config/http_config.go:1495
↓ 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:1218
↓ 2 callersFunctionisEmptyNonNilURL
checks if u equals to &url.URL{}.
config/http_config_test.go:2241
↓ 2 callersFunctionisValidLabelNameContinuation
(b byte, quoted bool)
expfmt/text_parse.go:950
↓ 2 callersFunctionisValidLegacyRune
(b rune, i int)
model/metric.go:548
↓ 2 callersFunctionnonZeroCount
nonZeroCount returns the amount of values that are non-zero.
config/http_config.go:377
↓ 2 callersFunctionparseFloat
(s string)
expfmt/text_parse.go:1002
↓ 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:1406
↓ 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
↓ 2 callersFunctiontestMetric
(t testing.TB)
model/metric_test.go:39
↓ 2 callersFunctiontestTextParse
(t testing.TB)
expfmt/text_parse_test.go:45
↓ 2 callersFunctiontestTextParseError
(t testing.TB)
expfmt/text_parse_test.go:1003
↓ 2 callersFunctionupdateRootCA
updateRootCA parses the given byte slice as a series of PEM encoded certificates and updates tls.Config.RootCAs.
config/http_config.go:1464
↓ 2 callersMethodusingClientCert
()
config/http_config.go:1398
↓ 2 callersMethodusingClientKey
()
config/http_config.go:1402
↓ 2 callersFunctionvalidateLabels20
(labels []*dto.LabelPair)
expfmt/openmetrics_2_0_create.go:360
↓ 2 callersFunctionwriteFloat
writeFloat is equivalent to fmt.Fprint with a float64 argument but hardcodes a few common cases for increased efficiency. For non-hardcoded cases, it
expfmt/text_create.go:476
↓ 2 callersFunctionwriteInt
writeInt is equivalent to fmt.Fprint with an int64 argument but uses strconv.AppendInt with a byte slice taken from a sync.Pool to avoid allocations.
expfmt/text_create.go:502
↓ 2 callersFunctionwriteOpenMetrics20Sample
writeOpenMetrics20Sample writes a single sample for simple types (Counter, Gauge, Untyped).
expfmt/openmetrics_2_0_create.go:213
↓ 2 callersFunctionwriteOpenMetrics20Timestamp
writeOpenMetrics20Timestamp writes a float64 as a timestamp without scientific notation.
expfmt/openmetrics_2_0_create.go:335
↓ 2 callersFunctionwriteUint
writeUint is like writeInt just for uint64.
expfmt/openmetrics_create.go:682
↓ 1 callersMethodClone
Clone returns a copy of the label set.
model/labelset.go:109
↓ 1 callersMethodCloseIdleConnections
()
config/http_config.go:1615
↓ 1 callersMethodDel
Del registers a new DELETE route.
route/route.go:103
↓ 1 callersFunctionEncodeKey
(w io.Writer, priv *rsa.PrivateKey)
config/generate.go:45
↓ 1 callersMethodEqual
Equal returns true if both sets contain the same elements (and not more).
model/fingerprinting.go:67
↓ 1 callersMethodEqual
(o *SampleHistogramPair)
model/value_histogram.go:177
↓ 1 callersFunctionExtractSamples
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:204
↓ 1 callersMethodFastFingerprint
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 callersFunctionFinalizeOpenMetrics
FinalizeOpenMetrics writes the final `# EOF\n` line required by OpenMetrics.
expfmt/openmetrics_create.go:387
↓ 1 callersFunctionFingerprintFromString
FingerprintFromString transforms a string representation into a Fingerprint.
model/fingerprinting.go:26
↓ 1 callersFunctionFloatToTime
(v float64)
helpers/templates/time.go:49
↓ 1 callersFunctionGenerateCertificate
(caCert *x509.Certificate, caKey *rsa.PrivateKey, server bool, name string, ipAddresses ...net.IP)
config/generate.go:117
↓ 1 callersFunctionGenerateCertificateAuthority
(commonName string, parentCert *x509.Certificate, parentKey *rsa.PrivateKey)
config/generate.go:75
↓ 1 callersMethodHasFiring
HasFiring returns true iff one of the alerts is not resolved.
model/alert.go:127
↓ 1 callersMethodHasFiringAt
HasFiringAt returns true iff one of the alerts is not resolved at the time ts.
model/alert.go:138
↓ 1 callersMethodIntersection
Intersection returns the elements contained in both sets.
model/fingerprinting.go:82
↓ 1 callersFunctionIsValidMetricName
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 callersMethodLevel
Level returns the value of the logging level as an slog.Level.
promslog/slog.go:80
↓ 1 callersFunctionLoadHTTPConfig
LoadHTTPConfig parses the YAML input s into a HTTPClientConfig.
config/http_config.go:309
↓ 1 callersMethodMarshalJSON
MarshalJSON implements the json.Marshaler interface.
model/time.go:120
↓ 1 callersMethodMarshalText
MarshalText implements the encoding.TextMarshaler interface.
model/time.go:353
↓ 1 callersMethodMerge
Merge is a helper function to non-destructively merge two label sets.
model/labelset.go:116
↓ 1 callersMethodMilliseconds
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 callersFunctionNew
(fs embed.FS)
assets/embed_gzip.go:32
↓ 1 callersFunctionNewBasicAuthRoundTripper
NewBasicAuthRoundTripper will apply a BASIC auth authorization header to a request unless it has already been set.
config/http_config.go:907
↓ 1 callersFunctionNewHostRoundTripper
NewHostRoundTripper sets the [http.Request.Host] of every request.
config/http_config.go:1639
↓ 1 callersFunctionNewOpenMetricsFormat
NewOpenMetricsFormat generates a new OpenMetrics format matching the specified version number. Note: OpenMetrics version 2.0.0 is experimental and en
expfmt/expfmt.go:117
↓ 1 callersFunctionNewRoundTripperFromConfigWithContext
NewRoundTripperFromConfigWithContext returns a new HTTP RoundTripper configured for the given config.HTTPClientConfig and config.HTTPClientOption. The
config/http_config.go:630
↓ 1 callersFunctionNewTLSConfigWithContext
NewTLSConfigWithContext creates a new tls.Config from the given TLSConfig.
config/http_config.go:1263
← previousnext →101–200 of 697, ranked by callers