Documentation Index
Fetch the complete documentation index at: https://docs.prism.byescaleira.com/llms.txt
Use this file to discover all available pages before exploring further.
Observability
PrismFoundation provides actor-based observability tools for measuring performance, structured logging, crash reporting, and analytics tracking — all designed for Swift concurrency.Performance Tracing
PrismPerformanceTracer measures operation durations using hierarchical spans. It’s an actor, so it’s safe to use from any concurrency context.
PrismTraceSpan
Each span captures timing and metadata:| Property | Type | Description |
|---|---|---|
id | UUID | Unique span identifier |
name | String | Human-readable operation name |
startTime | Date | When the span started |
endTime | Date? | When the span ended |
duration | Duration? | Wall-clock duration |
metadata | [String: String] | Arbitrary key-value pairs |
children | [PrismTraceSpan] | Nested child spans |
Using the Tracer
Manual Span Management
Automatic Measurement
Structured Logging
PrismStructuredLogger provides leveled logging with metadata, source location, and category grouping.
Log Levels
Ordered from least to most critical:PrismLogEntry
Each log entry captures:Creating Log Entries
Crash Reporting
PrismCrashReporter is an actor that collects crash reports and notifies a callback.
PrismCrashReport
| Property | Type | Description |
|---|---|---|
id | UUID | Unique report identifier |
message | String | Crash description |
stackTrace | String? | Stack trace at crash time |
timestamp | Date | When the crash occurred |
appVersion | String? | App version at crash time |
metadata | [String: String] | Additional context |
Recording Crashes
Analytics Funnels
PrismAnalyticsFunnel tracks user progression through a sequence of steps, computing conversion rates between each stage.
Funnel Tracking
Network Inspector
PrismNetworkInspector intercepts and records network requests for debugging and diagnostics.
Network Inspection
Overview
Performance Tracing
Actor-based span tracing with hierarchical children, metadata, and automatic
measure() helper.Structured Logging
Six severity levels with category grouping, metadata, and auto-captured source location.
Crash Reporting
Actor-isolated crash report collection with async callback notification.
Analytics Funnels
Step-by-step user progression tracking with automatic conversion rate computation.