Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/TechNickAI/claude_telemetryWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/technickai/claude_telemetry/logfire-logging)<a href="https://agentmods.dev/rules/technickai/claude_telemetry/logfire-logging"><img src="https://agentmods.dev/badge/rules/technickai/claude_telemetry/logfire-logging/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/technickai/claude_telemetry/logfire-logging"><img src="https://agentmods.dev/badge/rules/technickai/claude_telemetry/logfire-logging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00009 | $0.00487 |
| Opus 5.5 | $0.00004 | $0.00195 |
| Sonnet 5.5 | $0.00002 | $0.00097 |
| Haiku 4.5 | $0.00001 | $0.00049 |
Grade A, and why
logfire-logging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- logfire-logging — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Logfire Logging
Core Pattern
from helpers.observability import logfire
# Basic logging
logfire.info("Operation completed",
operation="data_processing",
item_count=123)
# Spans for duration tracking
with logfire.span("Processing batch", batch_id=batch.id):
result = process_batch(batch)
logfire.info("Batch complete", items_processed=result.count)
When to Use Spans
We use spans for operations that have duration to track, nested sub-operations, or need grouped logs for easier debugging.
Span Naming
Create specific, human-readable span names:
with logfire.span(
f"Processing {strategy_name} for {item.name}",
item_id=item.id,
strategy_name=strategy_name,
operation="strategy_processing"
):
execute_strategy()
with logfire.span(
f"Syncing orders for {customer.email}",
customer_id=customer.id,
order_count=len(orders),
operation="order_sync"
):
sync_all_orders(orders)
with logfire.span(
f"Generating report for {date.isoformat()}",
report_type="daily_sales",
date=date.isoformat()
):
generate_daily_report(date)
Span names should immediately tell you what's happening. Include key identifiers to make debugging easier.
Logging Levels
logfire.info()- Normal operations, important eventslogfire.error()- Serious problemslogfire.warning()- Concerning but recoverablelogfire.debug()- Detailed info for development
Context Attributes
Include searchable, meaningful attributes:
logfire.info(
"Order processed successfully",
order_id=order.id,
customer_id=customer.id,
total_amount=float(order.total),
operation="order_processing"
)
What NOT to Log
We skip sensitive data (API keys, passwords), high-frequency noise (every loop iteration), obvious operations ("Starting function"), and debugging artifacts (use debug level for raw responses).
Best Practices
We make the first line immediately useful, include specific values (not just "processing"), use consistent attribute naming (snake_case), convert Decimals to floats, and stay thoughtful about volume.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 93 lines · 9 tokens per session scan A 833ad7f1a957
logfire-logging is a cursor rule published in the GitHub repository TechNickAI/claude_telemetry (31 stars, last pushed 11mo ago), licensed MIT. It adds 9 tokens to every session and 487 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
release-checklist
What to update with each code change or version release.
modus-checkbox-value-inversion-react-short
Critical bug fix for ModusWcCheckbox value property inversion.
pre-flight-check
Mandatory fail-fast quality gate — run Typecheck, Lint, Test, and Security Audit sequentially before declaring any task done or committing code.
05-daemons-ipc
Use this rule to understand the roles of the HAPPE/IDA/mcp-hostd daemons, how HAPPE and IDA communicate via IPC, find the IPC message structure definitions, trace the memory retrieval flow, and identify daemon responsibilities.
graphql
GraphQL: schema design, resolvers, performance.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.