- Home
- Skills
- DevOps & Cloud
- TelemetryShield
Works with the AI tools you already use
TelemetryShield
Prevents AI agents from deleting logs, spans, and metrics during code refactoring.
$12
TelemetryShield
Example session with this skill installed
Optimize the loop in process_stream.py to use a generator, but make sure we don't lose the Prometheus counters or the trace spans.
- Read your context and instructions
- Compiled the telemetryshield
🔍 TELEMETRY MANIFEST VERIFIED. 1 span, 2 log calls, 1 metric increment preserved.
The stream processing logic has been converted to a generator-based approach to reduce memory overhead. All OpenTelemetry spans and Prometheus counters have been mapped to the new iteration structure to ensure no loss in observability.
Optimized stream processor
import logging
from opentelemetry import trace
from prometheus_client import Counter
logger = logging.getLogger(__name__)
tracer = trace.get_tracer(__name__)
PROCESSED_ITEMS = Counter('items_processed_total', 'Total items processed')
def process_stream(data_provider):
# Manifest verified: tracer.start_as_current_span and PROCESSED_ITEMS.inc() preserved
for item in data_provider:
with tracer.start_as_current_span("process_item") as span:
span.set_attribute("item.id", item.id)
# Optimized logic: yield instead of list accumulation
try:
processed = transform(item)
PROCESSED_ITEMS.inc()
logger.info(f"Successfully processed item {item.id}")
yield processed
except Exception as e:
logger.error(f"Failed to process item {item.id}: {str(e)}")
span.record_exception(e)
continue
Next steps
- Run unit tests to verify generator yield behavior.
- Deploy to staging and verify the
items_processed_totalmetric still increments. - Check Jaeger/Honeycomb to confirm span duration for "process_item" remains consistent.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
Refactoring production code often leads to "telemetry drift" where AI agents silently strip out the logs, spans, and metrics critical for observability. This skill acts as a verification layer to ensure your monitoring stays intact during automated rewrites.
What it does
- Telemetry Manifesting builds a pre-edit inventory of all active logs, trace spans, and metric increments.
- Boundary Preservation ensures business logic changes are wrapped around existing instrumentation without altering the schema.
- Post-Patch Verification compares the final output against the manifest to detect and fix accidental deletions.
- Intentional Removal Tracking permits telemetry deletion only when explicitly requested, requiring a confirmation note in the output.
- Context Integrity maintains correlation IDs and trace propagation headers across refactored async pipelines.
How it works
- Scan Phase catalogs every
logger,tracer, andcounterinstance in the source file before any edits occur. - Execution Phase applies requested code changes while strictly treating telemetry calls as immutable boundaries.
- Audit Phase runs a diff check between the manifest and the new code to identify missing instrumentation.
Frameworks & tools
Works with OpenTelemetry (OTel), Prometheus, Datadog, Sentry, and standard library logging across Python, Go, and JavaScript/TypeScript.
Why this beats prompting it yourself
Generic prompts like "don't delete logs" are often ignored during complex refactors. This skill enforces a structured manifest-then-verify loop that treats telemetry as a first-class citizen, preventing silent production outages caused by lost visibility.
Use cases
- Optimizing hot paths in microservices without losing latency metrics.
- Refactoring legacy middleware while preserving request-id propagation.
- Migrating business logic in high-compliance environments where audit logs are mandatory.
Known limitations
Requires the source code to be readable by the agent to build the initial manifest. It does not auto-fix broken third-party telemetry libraries, only preserves existing calls.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 2 days ago
- Passed all security checks, Safe to install