Documentation
¶
Index ¶
- Constants
- func ObserveAgentRequest(path string, status int, d time.Duration)
- func ObserveAuditAppend(err error)
- func ObserveHTTPRequest(path string, status int, d time.Duration, slow bool)
- func ObservePluginSystemPoolCircuit(transition PluginSystemPoolCircuitTransition)
- func ObservePluginSystemPoolDuration(phase PluginSystemPoolDurationPhase, d time.Duration)
- func ObservePluginSystemPoolLifecycle(event PluginSystemPoolLifecycleEvent)
- func ObservePluginSystemPoolRetirement(reason PluginSystemPoolRetirementReason)
- func ObserveStoreSave(d time.Duration, err error)
- func Prometheus() string
- func RedactSubscriptionPath(value string) string
- func RequestPathForObservability(r *http.Request) string
- func ResetForTest()
- type PluginSystemPoolCircuitTransition
- type PluginSystemPoolDurationHistogram
- type PluginSystemPoolDurationPhase
- type PluginSystemPoolLifecycleEvent
- type PluginSystemPoolRetirementReason
- type PluginSystemPoolSnapshot
- func (s PluginSystemPoolSnapshot) CircuitCount(transition PluginSystemPoolCircuitTransition) uint64
- func (s PluginSystemPoolSnapshot) Duration(phase PluginSystemPoolDurationPhase) PluginSystemPoolDurationHistogram
- func (s PluginSystemPoolSnapshot) LifecycleCount(event PluginSystemPoolLifecycleEvent) uint64
- func (s PluginSystemPoolSnapshot) RetirementCount(reason PluginSystemPoolRetirementReason) uint64
- type Registry
- func (r *Registry) ObserveAgentRequest(path string, status int, d time.Duration)
- func (r *Registry) ObserveAuditAppend(err error)
- func (r *Registry) ObserveHTTPRequest(path string, status int, d time.Duration, slow bool)
- func (r *Registry) ObservePluginSystemPoolCircuit(transition PluginSystemPoolCircuitTransition)
- func (r *Registry) ObservePluginSystemPoolDuration(phase PluginSystemPoolDurationPhase, d time.Duration)
- func (r *Registry) ObservePluginSystemPoolLifecycle(event PluginSystemPoolLifecycleEvent)
- func (r *Registry) ObservePluginSystemPoolRetirement(reason PluginSystemPoolRetirementReason)
- func (r *Registry) ObserveStoreSave(d time.Duration, err error)
- func (r *Registry) Prometheus() string
- func (r *Registry) Reset()
- func (r *Registry) Snapshot() Snapshot
- type Snapshot
Constants ¶
const RedactedSubscriptionPath = "/sub/:token"
Variables ¶
This section is empty.
Functions ¶
func ObserveAuditAppend ¶
func ObserveAuditAppend(err error)
func ObserveHTTPRequest ¶
ObserveHTTPRequest records a path already classified by RequestPathForObservability; this string-only API cannot infer method semantics.
func ObservePluginSystemPoolCircuit ¶ added in v0.2.3
func ObservePluginSystemPoolCircuit(transition PluginSystemPoolCircuitTransition)
func ObservePluginSystemPoolDuration ¶ added in v0.2.3
func ObservePluginSystemPoolDuration(phase PluginSystemPoolDurationPhase, d time.Duration)
func ObservePluginSystemPoolLifecycle ¶ added in v0.2.3
func ObservePluginSystemPoolLifecycle(event PluginSystemPoolLifecycleEvent)
func ObservePluginSystemPoolRetirement ¶ added in v0.2.3
func ObservePluginSystemPoolRetirement(reason PluginSystemPoolRetirementReason)
func ObserveStoreSave ¶
func Prometheus ¶
func Prometheus() string
func RedactSubscriptionPath ¶ added in v0.2.3
RedactSubscriptionPath removes public subscription authority before a request path reaches any observability sink. ServeMux redirects non-canonical paths after cleaning dot segments and repeated slashes, so classify both the raw and effective paths without changing what routing receives.
func RequestPathForObservability ¶ added in v0.2.3
RequestPathForObservability returns one request path safe for logs and telemetry without modifying the URL used for routing. ServeMux unescapes path segments individually, so escaped slashes must remain inside their original segment while classifying the raw and effective first segments.
func ResetForTest ¶
func ResetForTest()
Types ¶
type PluginSystemPoolCircuitTransition ¶ added in v0.2.3
type PluginSystemPoolCircuitTransition int
const ( PluginSystemPoolCircuitTransitionUnknown PluginSystemPoolCircuitTransition = iota PluginSystemPoolCircuitTransitionOpened )
type PluginSystemPoolDurationHistogram ¶ added in v0.2.3
type PluginSystemPoolDurationPhase ¶ added in v0.2.3
type PluginSystemPoolDurationPhase int
const ( PluginSystemPoolDurationPhaseUnknown PluginSystemPoolDurationPhase = iota PluginSystemPoolDurationPhaseQueue PluginSystemPoolDurationPhaseStart PluginSystemPoolDurationPhaseHandler PluginSystemPoolDurationPhaseTotal )
type PluginSystemPoolLifecycleEvent ¶ added in v0.2.3
type PluginSystemPoolLifecycleEvent int
const ( PluginSystemPoolLifecycleEventUnknown PluginSystemPoolLifecycleEvent = iota PluginSystemPoolLifecycleEventWorkerStartSuccess PluginSystemPoolLifecycleEventWorkerStartFailure PluginSystemPoolLifecycleEventInvocationReusable PluginSystemPoolLifecycleEventInvocationFailure )
type PluginSystemPoolRetirementReason ¶ added in v0.2.3
type PluginSystemPoolRetirementReason int
const ( PluginSystemPoolRetirementReasonUnknown PluginSystemPoolRetirementReason = iota PluginSystemPoolRetirementReasonPoisoned PluginSystemPoolRetirementReasonMaxUses PluginSystemPoolRetirementReasonMaxAge PluginSystemPoolRetirementReasonCircuitOpen PluginSystemPoolRetirementReasonShutdown PluginSystemPoolRetirementReasonRejected )
type PluginSystemPoolSnapshot ¶ added in v0.2.3
type PluginSystemPoolSnapshot struct {
Durations [pluginSystemPoolDurationPhaseCount]PluginSystemPoolDurationHistogram
Lifecycle [pluginSystemPoolLifecycleEventCount]uint64
CircuitTransitions [pluginSystemPoolCircuitTransitionCount]uint64
Retirements [pluginSystemPoolRetirementReasonCount]uint64
}
func (PluginSystemPoolSnapshot) CircuitCount ¶ added in v0.2.3
func (s PluginSystemPoolSnapshot) CircuitCount(transition PluginSystemPoolCircuitTransition) uint64
func (PluginSystemPoolSnapshot) Duration ¶ added in v0.2.3
func (s PluginSystemPoolSnapshot) Duration(phase PluginSystemPoolDurationPhase) PluginSystemPoolDurationHistogram
func (PluginSystemPoolSnapshot) LifecycleCount ¶ added in v0.2.3
func (s PluginSystemPoolSnapshot) LifecycleCount(event PluginSystemPoolLifecycleEvent) uint64
func (PluginSystemPoolSnapshot) RetirementCount ¶ added in v0.2.3
func (s PluginSystemPoolSnapshot) RetirementCount(reason PluginSystemPoolRetirementReason) uint64
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
func (*Registry) ObserveAgentRequest ¶
func (*Registry) ObserveAuditAppend ¶
func (*Registry) ObserveHTTPRequest ¶
ObserveHTTPRequest records a path already classified by RequestPathForObservability; this string-only API cannot infer method semantics.
func (*Registry) ObservePluginSystemPoolCircuit ¶ added in v0.2.3
func (r *Registry) ObservePluginSystemPoolCircuit(transition PluginSystemPoolCircuitTransition)
func (*Registry) ObservePluginSystemPoolDuration ¶ added in v0.2.3
func (r *Registry) ObservePluginSystemPoolDuration(phase PluginSystemPoolDurationPhase, d time.Duration)
func (*Registry) ObservePluginSystemPoolLifecycle ¶ added in v0.2.3
func (r *Registry) ObservePluginSystemPoolLifecycle(event PluginSystemPoolLifecycleEvent)
func (*Registry) ObservePluginSystemPoolRetirement ¶ added in v0.2.3
func (r *Registry) ObservePluginSystemPoolRetirement(reason PluginSystemPoolRetirementReason)
func (*Registry) Prometheus ¶
type Snapshot ¶
type Snapshot struct {
StartedAt time.Time
Uptime time.Duration
Store map[string]durationStats
Audit map[string]uint64
HTTP map[httpKey]durationStats
HTTPSlow map[string]uint64
Agent map[httpKey]durationStats
PluginSystemPool PluginSystemPoolSnapshot
}
func CurrentSnapshot ¶
func CurrentSnapshot() Snapshot