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/GoranErhartic/cursor-development-rulesWrote 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/goranerhartic/cursor-development-rules/logging-tracing-capture)<a href="https://agentmods.dev/rules/goranerhartic/cursor-development-rules/logging-tracing-capture"><img src="https://agentmods.dev/badge/rules/goranerhartic/cursor-development-rules/logging-tracing-capture/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/goranerhartic/cursor-development-rules/logging-tracing-capture"><img src="https://agentmods.dev/badge/rules/goranerhartic/cursor-development-rules/logging-tracing-capture.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.00023 | $0.01708 |
| Opus 5.5 | $0.00009 | $0.00683 |
| Sonnet 5.5 | $0.00005 | $0.00342 |
| Haiku 4.5 | $0.00002 | $0.00171 |
Grade A, and why
logging-tracing-capture scanned grade A with 1 finding 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 3mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const response = await fetch(options.url, { How it starts
The opening of the file, as written. The whole thing — 249 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lambda X-Ray Capture & CDK
Tracing AWS SDK Clients
// src/shared/clients/dynamodb.ts
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { DynamoDBDocumentClient } from "@aws-sdk/lib-dynamodb";
import { tracer } from "@/shared/tracer";
let docClient: DynamoDBDocumentClient | undefined;
export function getDynamoDBClient(): DynamoDBDocumentClient {
if (!docClient) {
const client = new DynamoDBClient({});
// Capture AWS SDK calls in X-Ray
tracer.captureAWSv3Client(client);
docClient = DynamoDBDocumentClient.from(client);
}
return docClient;
}
Tracing HTTP Clients (External APIs)
// src/shared/clients/http-client.ts
import { tracer } from "@/shared/tracer";
import { getRequestContext } from "@/shared/observability/request-context";
import { logger } from "@/shared/logger";
interface HttpRequestOptions {
method: "GET" | "POST" | "PUT" | "DELETE";
url: string;
headers?: Record<string, string>;
body?: unknown;
timeout?: number;
}
export async function tracedFetch<T>(options: HttpRequestOptions): Promise<T> {
const context = getRequestContext();
const segment = tracer.getSegment();
const subsegment = segment?.addNewSubsegment(`HTTP ${options.method} ${new URL(options.url).hostname}`);
const startTime = Date.now();
try {
// Add trace context to outgoing request
const headers: Record<string, string> = {
...options.headers,
"X-Correlation-Id": context?.correlationId ?? "",
};
// Propagate X-Ray trace header for downstream tracing
if (process.env._X_AMZN_TRACE_ID) {
headers["X-Amzn-Trace-Id"] = process.env._X_AMZN_TRACE_ID;
}
subsegment?.addAnnotation("correlationId", context?.correlationId ?? "unknown");
subsegment?.addAnnotation("url", options.url);
subsegment?.addAnnotation("method", options.method);
subsegment?.addMetadata("requestHeaders", headers);
const response = await fetch(options.url, {
method: options.method,
headers,
body: options.body ? JSON.stringify(options.body) : undefined,
signal: options.timeout ? AbortSignal.timeout(options.timeout) : undefined,
});
const duration = Date.now() - startTime;
subsegment?.addAnnotation("statusCode", response.status);
subsegment?.addMetadata("responseHeaders", Object.fromEntries(response.headers));
logger.info({
correlationId: context?.correlationId,
url: options.url,
method: options.method,
statusCode: response.status,
durationMs: duration,
}, "External HTTP request completed");
if (!response.ok) {
const error = new Error(`HTTP ${response.status}: ${response.statusText}`);
subsegment?.addError(error);
throw error;
}
return response.json() as Promise<T>;
} catch (error) {
subsegment?.addError(error as Error);
logger.error({
correlationId: context?.correlationId,
url: options.url,
err: error,
}, "External HTTP request failed");
throw error;
} finally {
subsegment?.close();
}
}
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.
- 3mo ago First seen · 249 lines · 23 tokens per session scan A 60cc776b7c6b
logging-tracing-capture is a cursor rule published in the GitHub repository GoranErhartic/cursor-development-rules (20 stars, last pushed 9mo ago), licensed MIT. It adds 23 tokens to every session and 1,708 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
logging-tracing-capture compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| logging-tracing-captureGoranErhartic/cursor-development-rules | Cursor rule | 20 | 9mo ago | MIT | A | 23 | Cursor |
| aws-ecssanjeed5/awesome-cursor-rules-mdc | Cursor rule | 3.6k | 8d ago | CC0-1.0 | A | 2,640 | Cursor |
| log-watchbriiirussell/cybersecurity-skills | Cursor rule | 542 | yesterday | MIT | A | 184 | Cursor |
| beanstalk-deploypr-pm/prpm | Cursor rule | 125 | 1mo ago | MIT | A | 0 | Cursor |
| deploymentlacymorrow/paperclip-hub | Cursor rule | 16 | 2d ago | MIT | A | 0 | Cursor |
| advisor-routingmicrosoft/azure-skills | Cursor rule | 1.7k | today | MIT | A | 37 | Cursor |
| aws-rds-best-practicesbeettlle/CursorRules | Cursor rule | 2 | 15d ago | none | A | 0 | Cursor |