# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
DeleteMatchingLabels removes metric with labels matching the filter.
DurationWithJitter returns random duration from "input - input*variance" to "input + input*variance" interval.
DurationWithPositiveJitter returns random duration from "input" to "input + input*variance" interval.
FormatTimeMillis returns a human readable version of the input time (in milliseconds).
FormatTimeModel returns a human readable version of the input time.
FromLabelPairsToLabels converts dto.LabelPair into labels.Labels.
GetLables returns list of label combinations used by this collector at the time of call.
GetSumOfHistogramSampleCount returns the sum of samples count of histograms matching the provided metric name and optional label matchers.
IsRequestBodyTooLarge returns true if the error is "http: request body too large".
LabelsToMetric converts a Labels to Metric Don't do this on any performance sensitive paths.
MergeNSampleSets merges and dedupes n sets of already sorted sample pairs.
MergeSampleSets merges and dedupes two sets of already sorted sample pairs.
No description provided by the author
No description provided by the author
No description provided by the author
NewDisableableTicker essentially wraps NewTicker but allows the ticker to be disabled by passing zero duration as the interval.
NewHistogramDataCollector creates new histogram data collector.
NewMetricFamilyMap sorts output from Gatherer.Gather method into a map.
NewUserRegistries makes new UserRegistries.
ParseProtoReader parses a compressed proto from an io.Reader.
ParseTime parses the string into an int64, milliseconds since epoch.
RenderHTTPResponse either responds with json or a rendered html page using the passed in template by checking the Accepts header.
SerializeProtoResponse serializes a protobuf response into an HTTP response.
StreamWriteYAMLResponse stream writes data as http response.
TimeFromMillis is a helper to turn milliseconds -> time.Time.
No description provided by the author
Sends message as text/html response with 200 status code.
WriteJSONResponse writes some JSON as a HTTP response.
Sends message as text/plain response with 200 status code.
WriteYAMLResponse writes some YAML as a HTTP response.
# Structs
ActiveUsers keeps track of latest user's activity timestamp, and allows purging users that are no longer active.
ActiveUsersCleanupService tracks active users, and periodically purges inactive ones while running.
BasicAuth configures basic authentication for HTTP clients.
HistogramData keeps data required to build histogram Metric.
HistogramDataCollector combines histogram data, with prometheus descriptor.
SummaryData keeps all data needed to create summary metric.
UserRegistries holds Prometheus registries for multiple users, guaranteeing multi-thread safety and stable ordering.
UserRegistry holds a Prometheus registry associated to a specific user.
# Interfaces
CollectorVec is a collector that can delete metrics by labels.
# Type aliases
CompressionType for encoding and decoding requests and responses.
MetricFamiliesPerUser is a collection of metrics gathered via calling Gatherer.Gather() method on different gatherers, one per user.
MetricFamilyMap is a map of metric names to their family (metrics with same name, but different labels) Keeping map of metric name to its family makes it easier to do searches later.