QueryMetricsObserver

class QueryMetricsObserver(registry: MeterRegistry) : QueryObserver

Publishes one QueryAudit per query as meters (§10 可观测):

  • wow.query (timer): tags context, aggregate, model, type, entry, outcome (success, error, cancelled) and code. code is the rejected rule, e.g. QuerySchemaValidation:UNKNOWN_FIELD, or none, so counting by code classifies admission rejections by the rule they broke.

  • wow.query.rows (summary): the records or rows delivered, tags context, aggregate, model, type.

No tag carries a filter value, a scope value or a fingerprint, so cardinality stays bounded.

Constructors

Link copied to clipboard
constructor(registry: MeterRegistry)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val audits: Boolean

Whether this observer wants onAudit; the gateway builds audits only when one is wanted.

Functions

Link copied to clipboard
open override fun onAudit(audit: QueryAudit)

One QueryAudit per subscription, at its terminal signal.