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.

Configuration
PipeKit.shared.configure(
apiKey: "pk_live_xxxxx",
config: PipeKitConfig(
captureConsoleLogs: true // enabled by default
)
)

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 log structured events with custom properties. These appear in the session timeline alongside system logs.

Custom Events
// Log a message with attributes
PipeKit.log("cache_cleared", attributes: [
"freed_bytes": "134217728",
"duration_ms": "42"
])
// Log an error with context
PipeKit.error("Cache clear failed", attributes: [
"flow": "clear-cache",
"reason": "disk_full"
])
// Log a warning
PipeKit.warning("User opened Settings")

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.

Configuration
PipeKit.shared.configure(
apiKey: "pk_live_xxxxx",
config: PipeKitConfig(
captureNetworkRequests: true // enabled by default
)
)

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 Filtering
let config = PipeKitConfig(
captureNetworkRequests: true,
networkConfig: NetworkCaptureConfig(
// Only capture requests matching these domains
allowedDomains: ["api.yourapp.com", "cdn.yourapp.com"],
// Redact these headers from captured data
redactedHeaders: ["Authorization", "X-API-Key"],
// Ignore requests to these paths
ignoredPaths: ["/health", "/ping"]
)
)

Log Filtering

Control which log levels are captured and set up content filters to prevent sensitive data from being recorded.

Log Filtering
let config = PipeKitConfig(
captureConsoleLogs: true,
logConfig: LogCaptureConfig(
// Only capture warning and above
minimumLevel: .warning,
// Redact patterns from log content
redactPatterns: [
"Bearer [a-zA-Z0-9\\-._~+/]+=*", // JWT tokens
"\\b\\d{4}[- ]?\\d{4}[- ]?\\d{4}[- ]?\\d{4}\\b" // card numbers
]
)
)

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.