Skip to main content

NewSummary

Creates a new labeled summary. Label keys must be set before instantiating. If the unlabeled option is given, this object will also instantiate and emit another summary with the given name with an _unlabeled suffix. See labeled.SetMetricsKeys for information about how to configure that.

def NewSummary(
name: string,
description: string,
scope: promutils.Scope,
opts: ...MetricOption
) - > Summary

Creates a new labeled summary. Label keys must be set before instantiating. If the unlabeled option is given, this object will also instantiate and emit another summary with the given name with an _unlabeled suffix. See labeled.SetMetricsKeys for information about how to configure that.

Parameters

NameTypeDescription
namestringThe name of the summary metric.
descriptionstringA description for the summary metric.
scopepromutils.ScopeThe Prometheus scope to register the summary with.
opts...MetricOptionOptional configurations for the summary, such as emitting an unlabeled metric or adding additional labels.

Returns

TypeDescription
SummaryA new Summary object configured with the specified options.