Skip to main content

Summary

Summary represents a summary labeled with values from the context. See labeled.SetMetricsKeys for information about how to configure that.

Methods


Observe()

@classmethod
def Observe(
ctx: context.Context,
v: float64
)

Observes a single event, recording the given value v for the summary. This method is used to add a new observation to the summary metric.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the observation, which can be used to extract labels for the summary metric.
vfloat64The value of the observation to be recorded by the summary.