Skip to content

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.

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

IDMeaning
traceIdW3C trace id for a recorded request
replayIdIdentifier for one replay execution of a case
planIdReplay plan container
planItemIdOperation-level item within a plan
diffIdComparison 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.