Documentation
¶
Index ¶
Constants ¶
View Source
const ( PropertyErrorLevel = "log.level.error" PropertySlowLevel = "log.level.slow" PropertySlowThreshold = "log.slowThreshold" PropertyOperationLevel = "log.level.operation" PropertySQLLevel = "log.level.sql" PropertySQLParamsLevel = "log.level.sql.params" PropertyHTTPLevel = "log.level.http" PropertyHTTPHeadersLevel = "log.level.http.headers" PropertyHTTPRequestBodyLevel = "log.level.http.request.body" PropertyHTTPResponseBodyLevel = "log.level.http.response.body" DefaultCollectorEntries = 100 )
Variables ¶
This section is empty.
Functions ¶
func ParseLevelName ¶
ParseLevelName resolves one of SupportedLevelNames to its level. "off" is not a level and reports ok=false along with off=true, so a caller can tell "switch this feature off" from "that is not a level I know" and reject the latter rather than quietly running at a level nobody asked for.
func SupportedLevelNames ¶
func SupportedLevelNames() []string
Types ¶
type Capability ¶
type Capability struct {
Family ProviderFamily `json:"family"`
SlowThreshold string `json:"slowThreshold"`
ThresholdLabel string `json:"thresholdLabel"`
Events []EventDefinition `json:"events"`
}
func CapabilityFor ¶
func CapabilityFor(connectionType string) Capability
type Event ¶
type Event string
const ( EventError Event = "error" EventSlow Event = "slow" EventOperation Event = "operation" EventSQL Event = "sql" EventSQLParams Event = "sql_params" EventHTTP Event = "http" EventHTTPHeaders Event = "http_headers" EventHTTPRequestBody Event = "http_request_body" EventHTTPResponseBody Event = "http_response_body" )
type EventDefinition ¶
type EventDefinition struct {
Event Event `json:"event"`
Property string `json:"property"`
Label string `json:"label"`
Description string `json:"description"`
Default string `json:"default"`
Captures []string `json:"captures"`
Example map[string]any `json:"example"`
PrettyExample string `json:"prettyExample"`
}
type Policy ¶
type Policy struct {
Family ProviderFamily
SlowThreshold time.Duration
// contains filtered or unexported fields
}
func (Policy) Completion ¶
type ProviderFamily ¶
type ProviderFamily string
const ( ProviderGeneric ProviderFamily = "generic" ProviderSQL ProviderFamily = "sql" ProviderHTTP ProviderFamily = "http" )
Click to show internal directories.
Click to hide internal directories.