Platform

Logs & Network Capture

PipeKit captures console logs and network requests as telemetry bound to sessions and flow executions. Every log entry and API call is indexed by execution context.

Console Log Capture

When enabled, PipeKit intercepts console output and captures it with severity levels, timestamps, and session context. Logs are correlated to flow executions automatically — when a node runs, any log output produced during that execution window is tagged with the execution ID.

Console capture is enabled by default — a plain configure call is all you need:

Configuration.swift
import PipeKit
// Console capture is on by default
PipeKit.configure(apiKey: "pk_live_xxxxx")

Log Levels

PipeKit captures logs at all severity levels. In the dashboard, you can filter by level to isolate errors or trace execution behavior.

Level
Color
Use
debug
Verbose diagnostic output
info
General operational messages
warning
Unexpected but recoverable conditions
error
Failures requiring attention
fault
Critical system-level failures

Custom Events

In addition to automatic console capture, you can emit log messages directly. These appear in the session timeline alongside system logs, tagged with their severity level.

CustomEvents.swift
import PipeKit
// Log a message
PipeKit.log("Cache cleared — freed 128MB in 42ms")
// Log an error
PipeKit.error("Cache clear failed: disk_full")
// Log a warning
PipeKit.warning("User opened Settings")
// Verbose diagnostic output
PipeKit.debug("Reachability changed to .wifi")

Network Request Capture

PipeKit intercepts URLSession traffic and records request and response data for every API call made during a session. Each network entry includes the URL, method, status code, request/response sizes, timing, and headers.

When a flow execution triggers network activity — for example, a node that calls an API — those requests are tagged with the execution ID. From the execution detail view, you can inspect exactly what the node transmitted and what the server returned.

Network capture is enabled by default and requires no extra setup:

Configuration.swift
import PipeKit
// Network capture is on by default
PipeKit.configure(apiKey: "pk_live_xxxxx")

Captured Network Data

For each intercepted request, PipeKit records:

URL & MethodFull request URL and HTTP method (GET, POST, DELETE, etc.).
Status CodeHTTP response status code and reason phrase.
TimingRequest start time, duration, and time-to-first-byte.
Request SizeSize of the request body in bytes.
Response SizeSize of the response body in bytes.
HeadersRequest and response headers (sensitive headers can be filtered).

Filtering & Redaction

You can filter network requests and redact sensitive data before it leaves the device. This is important for production environments where API tokens, auth headers, or user data may appear in requests.

Network capture is tuned through SessionLoggerConfig. Common defaults (authorization, cookie, x-api-key) are already redacted; add your own headers and exclude URLs by regex:

NetworkFiltering.swift
import PipeKit
var logs = SessionLoggerConfig()
// Redact additional headers from captured data
logs.redactedHeaders.insert("x-custom-token")
// Exclude requests matching these regex patterns
logs.excludedURLPatterns = [".*/health", ".*/ping", ".*/auth/.*"]
// Cap how much of each body is captured (bytes)
logs.maxBodySize = 32_768
PipeKit.configure(
apiKey: "pk_live_xxxxx",
config: PipeKitConfig(logConfig: logs)
)

Log Filtering

Control which log levels are captured with minimumLogLevel on SessionLoggerConfig. Anything below the threshold is dropped before it leaves the device.

LogFiltering.swift
import PipeKit
var logs = SessionLoggerConfig()
// Only capture warning and above
logs.minimumLogLevel = .warning
PipeKit.configure(
apiKey: "pk_live_xxxxx",
config: PipeKitConfig(logConfig: logs)
)

Viewing in the Dashboard

Logs and network requests appear in the session detail view alongside the session replay timeline. You can:

Filter by log level

Isolate errors, warnings, or specific severity levels.

Search log content

Full-text search across all log entries in a session.

Filter by execution

Show only logs and requests tied to a specific flow execution.

Inspect request detail

View full request/response payloads, headers, and timing.

Third-party SDK compatibility

Some third-party SDKs that swizzle URLSession may interfere with network capture. If you observe missing requests, check for conflicting URL protocol handlers in your dependency chain.

Next: Privacy & Security

Configure data masking, view sensitivity, and GDPR compliance.