Documentation
¶
Overview ¶
Package netdebug connects optional transport diagnostics to the SDK log queue without adding HTTP dependencies to plugins that do not use HTTP
Index ¶
- Constants
- func Clear(owner any)
- func Configure(owner any, enabled bool, report func(Event))
- func Endpoint(raw string) string
- func HeaderRedactor(redact func(string) string, headers ...*Headers) func(string) string
- func IO(address net.Addr, operation string, size int)
- func SensitiveHeader(name string) bool
- type Body
- type Capture
- type Details
- type Event
- type Header
- type HeaderCapture
- type Headers
- type Trace
Constants ¶
const BodyLimit = 64 << 10
const HeaderCount = 128
const HeaderLimit = 8 << 10
Variables ¶
This section is empty.
Functions ¶
func HeaderRedactor ¶
HeaderRedactor also removes header credentials echoed in another field/body
func SensitiveHeader ¶
Identify credential-bearing and otherwise sensitive headers
Types ¶
type Body ¶
type Capture ¶
type Capture struct {
// contains filtered or unexported fields
}
Capture only retains bytes that the caller actually reads. Oversized bodies are omitted entirely, so a truncated credential cannot escape sanitization
func NewCapture ¶
Create a bounded request or response body capture
type HeaderCapture ¶
type HeaderCapture struct {
// contains filtered or unexported fields
}
HeaderCapture keeps a bounded snapshot, never retaining a partial field value Wire trace callbacks replace the request-map fallback without mutating traffic
func NewHeaders ¶
func NewHeaders(values map[string][]string) *HeaderCapture
Create a bounded capture of HTTP headers
func (*HeaderCapture) Snapshot ¶
func (c *HeaderCapture) Snapshot() *Headers
Return a snapshot of the captured headers
func (*HeaderCapture) Written ¶
func (c *HeaderCapture) Written(name string, values []string)
Record the values actually written for a header
func (*HeaderCapture) WroteRequest ¶
func (c *HeaderCapture) WroteRequest()
Advance the capture to the next request after transmission