EntryStore
class EntryStore
Traits
Constants
| protected SUPPRESS_SECONDS |
|
Properties
| static protected float|null | $suppressedUntil | Deliberately static: a write failure suppresses recording for a short window. Each long-lived worker keeps its own breaker, and process-per-request setups reset it. |
|
| protected IncomingEntry|null | $pending |
Methods
Redact the values of the given keys throughout the data.
Final storage pass for entry payloads. Earlier builders redact known request surfaces, but this keeps persisted entries private if a future collector path adds sensitive data before save.
Redact the values of the given lowercase keys at every depth.
Flatten the given headers, redacting the sensitive ones and the sensitive query parameters of URL headers.
Normalize the configured sensitive keys to unique lowercase strings.
Redact sensitive query parameters from the URLs in the data.
Redact the values of sensitive query parameters. A parameter matches when its decoded
name or any of its bracketed segments (e.g. filter[secret]) is a sensitive key. The
query is not parsed and rebuilt, so every other byte of the URL is kept as recorded,
and relative or malformed URLs are redacted the same way.
Replace leaf values that cannot be stored as JSON with a marker.
Determine if the value can be stored as JSON.
Get the pending entry.
Discard the pending entry.
Reset the circuit breaker so recording resumes immediately.
Flush all static state.
Details
in
RedactsSensitiveData at line 27
protected array
redact(array $data, array $keys)
Redact the values of the given keys throughout the data.
in
RedactsSensitiveData at line 46
protected array
redactSensitiveStoragePayload(array $payload)
Final storage pass for entry payloads. Earlier builders redact known request surfaces, but this keeps persisted entries private if a future collector path adds sensitive data before save.
in
RedactsSensitiveData at line 81
protected array
redactRecursive(array $data, array $loweredKeys)
Redact the values of the given lowercase keys at every depth.
in
RedactsSensitiveData at line 101
protected array
redactHeaders(array $headers)
Flatten the given headers, redacting the sensitive ones and the sensitive query parameters of URL headers.
in
RedactsSensitiveData at line 127
protected array
normalizeSensitiveKeys(array $keys)
Normalize the configured sensitive keys to unique lowercase strings.
in
RedactsSensitiveData at line 149
protected array
redactUrls(array $data, array $keys)
Redact sensitive query parameters from the URLs in the data.
in
RedactsSensitiveData at line 181
protected string
redactUrl(string $url, array $keys)
Redact the values of sensitive query parameters. A parameter matches when its decoded
name or any of its bracketed segments (e.g. filter[secret]) is a sensitive key. The
query is not parsed and rebuilt, so every other byte of the URL is kept as recorded,
and relative or malformed URLs are redacted the same way.
in
RedactsSensitiveData at line 210
protected array
sanitizeForJsonEncoding(array $data)
Replace leaf values that cannot be stored as JSON with a marker.
in
RedactsSensitiveData at line 226
protected bool
isJsonEncodable(mixed $value)
Determine if the value can be stored as JSON.
at line 30
void
record(IncomingEntry $entry)
Record the entry to persist once the request has been handled.
at line 38
IncomingEntry|null
current()
Get the pending entry.
at line 46
void
reset()
Discard the pending entry.
at line 54
void
flush(EntriesRepository $repo)
Persist the pending entry and prune expired entries.
at line 113
static void
resetCircuitBreaker()
Reset the circuit breaker so recording resumes immediately.
The breaker is shared by every request in the worker, so a reset during a request resumes writes for all of them while storage may still be failing.
at line 122
static void
flushState()
Flush all static state.