Adapters expose backend observability capabilities through stable, safe contracts.
They should hide vendor-specific details from the runbook layer as much as possible.
Every adapter should define:
- input schema
- output schema
- auth and access boundary
- timeout
- result limits
- masking rules
- audit fields
Each adapter response should include:
ok: whether the call succeededsource: adapter namequery: normalized inputsummary: short response summaryevidence: zero or more normalized evidence itemsraw_ref: pointer to the raw source payloaderrors: normalized error list
In the current MVP, raw adapter responses are converted into evidence through metadata files rather than hardcoded switch statements.
Examples:
adapters/trace/trace.lookup.normalization.jsonadapters/trace/trace.inspect_spans.normalization.jsonadapters/db/db.readonly_query.normalization.jsonadapters/db/db.lookup_entity.normalization.jsonadapters/redis/redis.inspect.normalization.json
This layer is separate from runbook logic.
Reason:
- adapters decide how raw source payloads become normalized evidence
- runbooks decide how normalized evidence should be interpreted
Cross-source evidence should also be externalized when possible.
In the current MVP, derived evidence lives in:
evidence-policies/derived-evidence.json
Example use case:
- compare Redis status with DB status
- emit
status_mismatchwhen they conflict
Responsibilities:
- locate traces by supported locator types
- summarize critical spans
- surface errors, status, duration, and missing stages
Suggested operations:
trace.lookuptrace.inspect_spanstrace.get_errors
Responsibilities:
- support predefined readonly queries or templated lookups
- prevent broad or unsafe SQL
- return normalized existence and state evidence
Suggested operations:
db.readonly_querydb.lookup_entity
Responsibilities:
- inspect keys, ttl, and small value snapshots
- avoid heavy scans in production
- normalize cache existence and freshness signals
Suggested operations:
redis.inspectredis.ttl
- arbitrary shell execution
- unrestricted SQL
- write or repair actions
- full raw payload injection into the model without filtering