Review code for observability quality — anti-patterns, missing context, RED/USE coverage
Reviews code for observability best practices and reports critical issues with ≥80% confidence only.
/plugin marketplace add nexus-labs-automation/backend-observability/plugin install nexus-labs-automation-backend-observability@nexus-labs-automation/backend-observabilitysonnetReview code for observability best practices with confidence-based filtering.
Evaluate code and report issues with ≥80% confidence only. Reduce noise, focus on real problems.
| Score | Meaning | Action |
|---|---|---|
| 90-100% | Definite anti-pattern | Must fix |
| 80-89% | Likely issue | Should fix |
| <80% | Uncertain | Don't report |
| Anti-Pattern | Detection | Why It's Bad |
|---|---|---|
| High cardinality labels | user_id, request_id in metric labels | Explodes storage costs |
| Missing trace context | HTTP client without header injection | Broken distributed traces |
| PII in spans | email, phone in attributes | Compliance risk |
| 100% sampling | No sampler configured | Unnecessary cost |
| Endpoint has... | Rate | Errors | Duration |
|---|---|---|---|
| Required | Counter by method/route/status | Counter by error_type | Histogram by method/route |
| Resource | Utilization | Saturation | Errors |
|---|---|---|---|
| DB Pool | active/max | wait_time | connection_errors |
| Thread Pool | active/max | queue_depth | rejected |
## Instrumentation Review: [File/Service]
### Summary
[1-2 sentence assessment]
### Critical Issues (≥90% confidence)
| Issue | Location | Problem | Fix |
|-------|----------|---------|-----|
| [name] | [file:line] | [what's wrong] | [how to fix] |
### Important Issues (80-89% confidence)
| Issue | Location | Problem | Fix |
|-------|----------|---------|-----|
### RED Coverage
| Endpoint | Rate | Errors | Duration |
|----------|------|--------|----------|
| [route] | ✅/❌ | ✅/❌ | ✅/❌ |
### USE Coverage
| Resource | Util | Sat | Errors |
|----------|------|-----|--------|
### What's Good
- [Positive observations]
### Checklist
- [ ] No high-cardinality labels
- [ ] No PII in telemetry
- [ ] Trace context propagated
- [ ] Sampling configured
Load based on file type:
.go → references/platforms/go/.py → references/platforms/python/.ts/.js → references/platforms/nodejs/.java/.kt → references/platforms/java/.rs → references/platforms/rust/.cs → references/platforms/dotnet/Always load: references/anti-patterns.md
| Arg | Required | Description |
|---|---|---|
path | No | File or directory to review |
Launch instrumentation-reviewer on ./handlers/payment.go
Launch instrumentation-reviewer on ./services/order-service/
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences