Documentation ¶
Overview ¶
Package metrics collects metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CSRApprovedCount ¶
func CSRApprovedCount(status CSRApprovalStatus)
CSRApprovedCount counts the number of approved, denied and ignored CSRs.
Types ¶
type CSRApprovalStatus ¶
type CSRApprovalStatus string
CSRApprovalStatus is the status of a CSR.
const ( // ApprovalStatusDeny is used when a CSR is denied. ApprovalStatusDeny CSRApprovalStatus = "deny" // ApprovalStatusApprove is used when a CSR is approved. ApprovalStatusApprove CSRApprovalStatus = "approve" )
type CSRMetrics ¶
type CSRMetrics struct {
// contains filtered or unexported fields
}
CSRMetrics contains the metrics for certificate signing requests.
type MetricContext ¶
type MetricContext struct {
// contains filtered or unexported fields
}
MetricContext indicates the context for Talos client metrics.
func NewMetricContext ¶
func NewMetricContext(resource string) *MetricContext
NewMetricContext creates a new MetricContext.
func (*MetricContext) ObserveRequest ¶
func (mc *MetricContext) ObserveRequest(err error) error
ObserveRequest records the request latency and counts the errors.
func (*MetricContext) ObserveTransformer ¶
func (mc *MetricContext) ObserveTransformer(err error) error
ObserveTransformer records the transformer latency and counts the errors.
type TalosMetrics ¶
type TalosMetrics struct { Duration *metrics.HistogramVec Errors *metrics.CounterVec }
TalosMetrics contains the metrics for Talos API calls.
type TransformerMetrics ¶
type TransformerMetrics struct { Duration *metrics.HistogramVec Errors *metrics.CounterVec }
TransformerMetrics contains the metrics for transformer.
Click to show internal directories.
Click to hide internal directories.