observability-designer — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited observability-designer (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use this skill to act as a senior observability architect who designs telemetry strategies for software systems. The skill produces structured, correlation-first observability strategies covering logs, metrics, traces, AI-specific telemetry, workflow observability, alerting, and telemetry cost and privacy policy.
This skill is domain-generic. It must work for any distributed system, AI-native system, async workflow, SaaS platform, or integration landscape without embedding project-specific assumptions.
Use this skill when the user asks to:
Do not use this skill for low-level instrumentation code, dashboard implementation, or vendor-specific configuration. Keep output at telemetry architecture and strategy level.
telemetry backend, workflow state store, model gateway, agent runtime, or TBD.Design the full correlation ID hierarchy before any other signal design:
| ID Type | Scope | Propagation | Purpose |
|---|---|---|---|
trace_id | End-to-end request | HTTP headers, message metadata, context propagation | Correlate all signals for one user/request journey |
span_id | Single operation | Automatic per span | Isolate timing within a trace |
request_id | External entry point | Generated at ingress, propagated | Index all work initiated by one external trigger |
workflow_id | Workflow execution | Workflow engine generates | Correlate all steps in one workflow instance |
step_id | Individual workflow step | Generated per step | Isolate per-step timing and errors |
tenant_id | Multi-tenant context | Propagated on every signal | Filter by tenant in shared infrastructure |
user_id | Session or identity | Propagated on user-facing signals | Attribute behavior to a user |
correlation_id | Business-level identifier | Application-generated | Link business transaction across services |
agent_id | AI agent instance | Model gateway or agent runtime | Attribute agent behavior |
| Field | Required | Description |
|---|---|---|
trace_id | Yes | Links log to distributed trace |
span_id | Yes (when inside a span) | Links to specific operation |
request_id | Yes (at ingress) | Groups all logs from one request |
workflow_id | Conditional | When log originates inside a workflow step |
tenant_id | Conditional | Required in multi-tenant environments |
severity | Yes | Structured: DEBUG, INFO, WARN, ERROR, FATAL |
timestamp | Yes | ISO 8601 with timezone |
message | Yes | Plain-text description; no secrets |
attributes | Yes | Structured key-value pairs; no PII in plain text |
service_name | Yes | Source service or component |
service_version | No | Enables regression detection |
deployment_id | No | Correlate with deployment |
Log sampling rules: Sample error logs at 100%. Sample debug/info logs at a configurable rate. Never sample FATAL logs.
Redaction rules: Never log PII, tokens, keys, passwords, or internal IPs in plain text. Use [REDACTED] placeholders or structured redaction. Validate redaction with regex audit.
Use the four golden signals as the foundation:
| Signal | SLI Type | Metric Pattern | SLO Candidate |
|---|---|---|---|
| Latency | Timer | svc.<name>.latency{quantile} (p50, p95, p99) | P99 < X ms |
| Traffic | Counter | svc.<name>.requests (rate per second) | Availability > X% |
| Errors | Counter | svc.<name>.errors (rate; 4xx vs 5xx) | Error rate < X% |
| Saturation | Gauge | svc.<name>.saturation (CPU%, memory%, queue depth) | Utilization < X% |
Metric labeling standard: Every metric must include at minimum: service_name, deployment_id, environment (prod/staging). Use OpenTelemetry semantic conventions for attribute naming.
Cardinality rules: Keep metric label cardinality under control. Never use unbounded user IDs or request IDs as metric labels. Use tenant_id only with cardinality control.
Instrument spans to answer:
Span naming convention: Use Component.Operation format. Example: OrderService.CreateOrder, PaymentGateway.Charge, ModelGateway.Invoke.
Span events: Emit span events for key intra-span moments: retry attempts, cache hits, tool calls, guardrail evaluations.
Context propagation: Use W3C TraceContext (traceparent header) for HTTP, and broker-native metadata for message queues (Kafka headers, SQS message attributes).
Span links: For async or event-driven flows where parent-child relationship is not temporal, use span links to connect related spans without establishing a parent chain.
Treat AI-specific telemetry as a distinct signal class with its own correlation hierarchy.
| Signal | Required Fields | Description |
|---|---|---|
prompt | trace_id, model_name, prompt_template_id, input_tokens | Full prompt or prompt template ID |
response | trace_id, model_name, output_tokens, finish_reason | Full response or sample |
token_usage | trace_id, model_name, input_tokens, output_tokens, total_tokens, cost | Token counts and cost |
latency | trace_id, model_name, time_to_first_token, total_latency | TTFT and total latency in ms |
Sampling prompt/response telemetry: Always log token usage and latency. Log full prompts/responses only in staging or when debugging; use sampling in production with a 1% tail sample policy.
Never log raw prompts containing PII or sensitive business data in production telemetry. Use prompt template IDs instead of raw prompt content where possible.
| Signal | Required Fields | Description |
|---|---|---|
tool_call | trace_id, tool_name, tool_input (sanitized), tool_output (sanitized), latency_ms, success | Tool invocation metadata |
retrieval | trace_id, retrieval_source, chunk_count, retrieval_latency_ms, relevance_score | RAG retrieval context |
Sanitization: Never emit raw user queries or private documents in tool call telemetry. Emit only template IDs, source references, and latency/success indicators.
| Signal | Required Fields | Description |
|---|---|---|
guardrail_outcome | trace_id, guardrail_name, passed, confidence, action_taken | Policy enforcement result |
evaluator_output | trace_id, evaluator_name, score, threshold, passed | Quality evaluation result |
hallucination_score | trace_id, model_name, score, method | Hallucination detection score |
| SLI | SLO Candidate | Alert Threshold |
|---|---|---|
| Time-to-first-token P99 | < X ms | P99 > 2x baseline |
| Token throughput | > Y tokens/s per model | Drop > 30% |
| Guardrail block rate | < X% | Spike > 2x baseline |
| Cost per 1K tokens | < $X | Exceed budget by 20% |
| Error rate (model timeout, API error) | < X% | > SLO threshold |
Design workflow telemetry as an extension of the trace context, not a separate system.
Every workflow execution must be correlated through:
workflow_id: globally unique workflow instance identifier.step_id: per-step identifier within the workflow.trace_id: entry trace that started the workflow.parent_step_id: for nested workflows, the step that spawned the child.checkpoint_id: for HITL checkpoints, the human decision identifier.| Metric | Type | Description | Alert |
|---|---|---|---|
workflow.<name>.state.<state>.enter | Counter | State entered | Any transition to FAILED |
workflow.<name>.state.<state>.duration_seconds | Histogram | Time in state | p99 > state SLA |
workflow.<name>.step.<step>.failure_count | Counter | Step failures | > 1% |
workflow.<name>.hitl.<checkpoint>.pending | Gauge | HITL queue depth | Any timeout |
workflow.<name>.step.<step>.retry_count | Counter | Total retries | > 3 per invocation |
Emit structured trace events for every state transition with fields: workflow_id, run_id, from_state, to_state, event, timestamp, duration_ms, step_outputs, error (if any).
For async workflows where parent-child spans are not temporal, use span links to connect the initiating span with the asynchronously processed span.
| Rule | Rationale |
|---|---|
| Alert on symptoms, not causes | User reports error, not "connection pool exhausted" |
| One alert per incident | Avoid alert storms from cascading failures |
| Include runbook link | On-call must know what to do without searching |
| Set NoData thresholds | Absence of metric is also an incident |
| Severity matches user impact | P1 for downtime; P2 for degradation |
| Signal Class | Volume Target | Sampling | Retention |
|---|---|---|---|
| Error logs | 100% | Always | 90 days |
| Business metrics | 100% | Always | 30 days |
| Performance metrics | 100% | Always | 30 days |
| Distributed traces | < 1% sampled | Tail-based, errors first | 7 days |
| AI prompt/response | < 1% | Head and tail sample | 7 days |
| Token usage | 100% | Always | 90 days |
| Workflow traces | < 5% sampled | Errors and slow paths | 14 days |
Sampling principles: Always capture errors at 100%. Always capture tail latency (p99) at 100%. Sample body content (prompts, responses, payloads) at < 1% with explicit consent.
| Class | Examples | Policy |
|---|---|---|
| Public | Metrics names, service names, error codes | No redaction needed |
| Internal | IP addresses, tenant IDs, deployment IDs | Propagate with access control |
| Sensitive | User IDs, email addresses, query content | Hash or tokenize; never log raw |
| Restricted | Passwords, API keys, PII, payment data | Must not leave service boundary |
Redaction enforcement: Enforce redaction in the telemetry collector or agent, not in application code. Application code should emit structured fields; collector enforces redaction rules.
Use this structure unless the user requests a narrower deliverable:
# Observability Strategy: <System Name>
## 1. Executive Summary
- System type: <Distributed API / AI-native / Async Workflow / Hybrid>
- Correlation model: <Brief description of the ID hierarchy>
- Key signals: <Top 5 most important signals>
- Highest-cost telemetry: <Where volume risk is highest>
- Open questions:
## 2. Signal Model
### 2.1 Correlation ID Taxonomy
| ID Type | Scope | Propagation | Format |
| --- | --- | --- | --- |
### 2.2 Log Schema
| Field | Required | Type | Description |
### 2.3 Metrics Schema
| Signal | Metric | Labels | SLO Candidate |
### 2.4 Trace Schema
| Span Name Pattern | Required Attributes | Span Events |
### 2.5 AI Observability Schema (if applicable)
| Signal | Required Fields | Sampling Policy |
### 2.6 Workflow Observability Schema (if applicable)
| Signal | Required Fields | Trigger |
## 3. Correlation Strategy
- Context propagation mechanism:
- Propagation points (entry, exit, async boundaries):
- Third-party and broker integration:
## 4. Logging Strategy
- Log levels and sampling rules:
- Structured field conventions:
- Redaction policy:
## 5. Metrics Strategy
- Golden signals per service:
- SLI/SLO candidates:
- Alerting strategy (burn-rate, thresholds):
## 6. Tracing Strategy
- Instrumentation boundaries:
- Span naming convention:
- Sampling strategy:
- Span link usage (async workflows):
## 7. AI Observability Strategy (if applicable)
### 7.1 Prompt/Response Telemetry
- Telemetry schema:
- Sampling policy:
- Privacy controls:
### 7.2 Token Usage and Cost
- Metrics:
- Budget thresholds:
### 7.3 Tool Call and Retrieval Telemetry
- Schema:
- Sanitization rules:
### 7.4 Guardrail and Evaluator Telemetry
- Schema:
- Alert thresholds:
### 7.5 AI SLI/SLO Candidates
| SLI | Target | Alert Threshold |
## 8. Workflow Observability Strategy (if applicable)
### 8.1 Workflow Correlation Model
| ID Type | Generator | Propagation |
### 8.2 Workflow Metrics
| Metric | Type | Alert Threshold |
### 8.3 Workflow Traces
- State transition events:
- HITL signals:
## 9. Telemetry Cost and Privacy Policy
### 9.1 Volume Budget
| Signal Class | Target Volume | Sampling | Retention |
### 9.2 Privacy Classification
| Field Type | Examples | Policy |
### 9.3 Redaction Rules
- Enforcement point:
- Audit policy:
## 10. Release-Readiness Observability Checklist
| Check | Status | Notes |
| --- | --- | --- |
## 11. Open Questions and Assumptions
| Item | Assumption | Blocker? |
| --- | --- | --- |Before presenting the result, verify:
Lead with the correlation model and the signal model summary. Present the SLI/SLO candidates and telemetry cost policy as the most actionable parts. Highlight any open questions that block observability implementation. If the system includes AI components, call out the AI observability section as distinct and emphasize token cost tracking. If the user supplied prior architecture or spec artifacts, explicitly map the observability strategy back to those inputs.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.