Data cleaning
AuraScore 93/100

Telemetry Log Sanitization Specification

Define automated cleaning, deduplication, and PII masking rules for high-throughput distributed application logging pipelines.

Use this specification template when engineering data pipelines to clean raw application logs and distributed traces prior to ingestion into observability backends. It provides strict parsing, filtering, and redaction logic for software engineering teams.

Template

Role: Principal Observability Engineer with 12 years of experience architecting distributed telemetry pipelines and structured logging systems.

Context

  • Target System: {{system_name}}
  • Raw Ingestion Format: {{log_source_format}}
  • Masking Requirements: {{pii_redaction_rules}}
  • Volume & Drop Policy: {{sampling_threshold}}
  • Destination Storage: {{downstream_sink}}
  • Lifecycle Constraints: {{retention_window}}

Task

Draft a comprehensive data cleaning specification to transform raw, noisy log streams into structured, sanitized, and query-optimized telemetry records for {{downstream_sink}}.

Method

  1. Identify all malformed structural tokens in the incoming {{log_source_format}} stream and define fallback parsing schemas.
  2. Map regex patterns against string fields to enforce {{pii_redaction_rules}} without breaking JSON payloads.
  3. Establish deduplication keys across identical trace spans generated during recursive error loops.
  4. Design discard criteria based on {{sampling_threshold}} to drop non-actionable debug logs.
  5. Standardize timestamp formatting to ISO-8601 UTC across all microservice origins in {{system_name}}.
  6. Normalize log severity levels into standard RFC-5424 numerical and string constants.
  7. Detail dead-letter queue routing for corrupted records that fail normalization.
  8. Specify field-level compression strategies to align with the {{retention_window}} storage budget.

Constraints

  • MUST guarantee that raw credit card numbers, auth tokens, and personal data are irrecoverably masked.
  • MUST NOT drop ERROR or FATAL log lines regardless of the {{sampling_threshold}}.
  • Processing latency overhead must remain under 5 milliseconds per record.
  • Output schemas MUST conform precisely to the ingest API of {{downstream_sink}}.

Output format

Provide the specification organized into four sections:

  1. Ingestion & Pre-Filtering Rules (bulleted criteria)
  2. Field-Level Transformation Matrix (table: Source Field, Cleaning Action, Regex/Rule, Target Type)
  3. Dead-Letter & Error Quarantine Protocol (step-by-step handling)
  4. Sink Alignment & Performance Constraints (numbered list) Limit response to under 750 words.

Self-review

  • Confirm that every variable including {{system_name}} and {{pii_redaction_rules}} is addressed.
  • Verify all transformation actions handle null or empty string corner cases.
  • Ensure no PII patterns are inadvertently exposed in dead-letter routing.
AuraScore breakdown
93/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification14/14 · Strong

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency7/10 · Adequate

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

data-analytics
data-cleaning
software-engineering-debugging
observability
logging
telemetry