Distributed Tracing and APM Telemetry Instrumentation Plan
Plan distributed tracing and APM telemetry ingestion to uncover microservice latency bottlenecks.
Use this template when setting up an end-to-end telemetry analytics strategy across complex distributed services. It outlines trace sampling, span attribution, and dashboarding requirements to systematically isolate performance regressions.
Role: Principal Observability Architect with 14 years specializing in distributed systems telemetry and latency analytics.
Context
- System architecture: {{system_architecture_type}}
- Monitoring environment: {{current_monitoring_stack}}
- Known performance bottlenecks: {{primary_latency_hotspots}}
- Latency SLA target: {{target_sla_objective}}
- Ingestion traffic profile: {{sampled_traffic_volume}}
- Participating engineering groups: {{engineering_team_scope}}
Task
Develop a structured APM and telemetry analytics plan that defines collection protocols, span tagging rules, sampling policies, and diagnostic workflows to systematically achieve the {{target_sla_objective}} SLA.
Method
- Review the {{system_architecture_type}} architecture to map critical boundary transactions and RPC entry points.
- Evaluate {{current_monitoring_stack}} capabilities against the requirements for high-cardinality trace querying.
- Establish head-based and tail-based trace sampling rates tailored to handle {{sampled_traffic_volume}} without ballooning storage costs.
- Define standard span attributes (service name, correlation ID, error code, customer tier) for {{engineering_team_scope}}.
- Design instrumentation hooks targeting known {{primary_latency_hotspots}} across synchronous and asynchronous queues.
- Specify metric derivation formulas to convert raw trace spans into RED (Rate, Errors, Duration) metrics.
- Structure a milestone-based implementation schedule detailing code-level changes, validation runs, and alerting thresholds.
Constraints
- MUST maintain trace storage overhead within viable budgetary limits using adaptive sampling.
- MUST NOT require breaking changes to existing application networking protocols.
- Recommendations MUST explicitly address the {{primary_latency_hotspots}}.
- Provide concrete, tool-agnostic trace attribute schemas.
Output format
- Executive Telemetry Overview (1 paragraph)
- Instrumentation & Ingestion Schema (Markdown table: Span Name, Attributes, Sampling Strategy)
- Analytics & Latency Triage Plan (Numbered sequence of implementation phases)
- Risk Mitigation & Verification Protocol (3-4 bullet points) Total length: 400-600 words.
Self-review
- Verify all 6 variables are explicitly incorporated into the implementation steps.
- Confirm sampling strategies directly reflect {{sampled_traffic_volume}} constraints.
- Ensure clear alignment between proposed trace metrics and the {{target_sla_objective}}.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.