Appearance
Concepts
Application (appId)
A registered service under test. Agents attach with the Java agent; recording and replay are scoped by appId.
- List:
sp app list - Agent heartbeat:
sp app status <appId>
Environment (targetEnv)
Replay runs target an environment name (e.g. staging, prod). Passed to sp replay run --env.
Recording policy
Declarative YAML (kind: RecordingPolicy) controlling what the agent records: sampling, operation include/exclude, time windows, sensitive-field scrubbing.
- Managed via
sp policy recording - Schema: Policy YAML guide
Mock policy
Declarative YAML (kind: MockPolicy) controlling replay-time mocking: skip/force mock, tolerance, dependencies.
sp policy mock
Compare rules
Declarative YAML (kind: CompareRulePolicy) controlling diff behavior during replay comparison.
sp policy compare
Policies merge by metadata.priority; global defaults ship in sp-policy-rules JAR resources.
Replay plan
A batch replay job with a planId. Created by sp replay run, tracked with sp replay status.
Schedule service endpoints: /api/createPlan, /progress, /api/stopPlan.
Trace and replay IDs
| ID | Meaning |
|---|---|
traceId | W3C trace id for a recorded request |
replayId | Identifier for one replay execution of a case |
planId | Replay plan container |
planItemId | Operation-level item within a plan |
diffId | Comparison result row for deep diff fetch |
Agents should obtain traceId via sp trace find when users supply business attributes (orderId, caseId) instead of trace IDs.
Historical coupling: schedule ↔ recording
Replay operation include/exclude lists on schedule configuration are populated from recording policy at read time, not stored independently on the schedule document.
Implications:
- Changing recording policy can change which operations appear in replay scope without editing schedule config.
- Diagnosis skills must not assume schedule Mongo documents are the sole source of operation filters.
See server comments on ScheduleConfigurableHandler in sp-tr-api.
Workspace (v2)
Console filesystem for cases, interfaces, and folders. Exposed as sp workspace — optional for agents that only drive replay from recorded production traffic.