queues

queues is a cursor rule for Cursor from getsentry/sentry-java. It costs 10 tokens per session (1,220 once invoked), scanned A, original, MIT.

Guidance for tracing messages sent through queues such as Kafka. It explains how producers and consumers record message publishing, processing, delays, failures, and links between services.

In plain words
What is it for?
Use it when adding or reviewing Java queue tracing, recording messaging details, connecting producer work to consumer work, or supporting Sentry’s queue monitoring.
Why use it?
It makes queue activity visible in tracing, including how long messages wait before processing and where failures occur.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding or reviewing Java queue tracing, recording messaging details, connecting producer work to consumer work, or supporting Sentry’s queue monitoring.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/getsentry/sentry-java/queues
About the project

getsentry/sentry-java is a Java and Android software development kit for sending application errors, events, and diagnostic information to Sentry. It is used by developers working with Java, Android, Kotlin, and other JVM-based applications to monitor software behavior. The catalogue rules, skills, instructions, and setting support workflows around this SDK.

getsentry/sentry-java · 1,357 stars · on GitHub · docs.sentry.io

Install

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.

Clone the repo
git clone --depth 1 https://github.com/getsentry/sentry-java

Made for: Cursor.

Wrote 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.

agentmods badge for queues

README.md
[![agentmods](https://agentmods.dev/badge/rules/getsentry/sentry-java/queues/github.svg)](https://agentmods.dev/rules/getsentry/sentry-java/queues)
Your own site
<a href="https://agentmods.dev/rules/getsentry/sentry-java/queues"><img src="https://agentmods.dev/badge/rules/getsentry/sentry-java/queues/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.

agentmods 80×15 button for queues

Your own site · 80×15
<a href="https://agentmods.dev/rules/getsentry/sentry-java/queues"><img src="https://agentmods.dev/badge/rules/getsentry/sentry-java/queues.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,220 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00010 $0.01220
Opus 5.5 $0.00004 $0.00488
Sonnet 5.5 $0.00002 $0.00244
Haiku 4.5 $0.00001 $0.00122

Measured 1mo ago against content hash 0cff65e1784e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

queues 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.

.cursor/rules/queues.mdc · 83 lines

How it starts

The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sentry Queues and Java SDK Queue Tracing

Product model

Sentry Queues is built from tracing data. SDKs mark queue work with queue-specific span operations and messaging span data so Sentry can identify producers, consumers, destinations, latency, and failures.

The important concepts are:

  • queue.publish: a span for enqueueing/publishing a message to a queue or topic.
  • queue.process: a transaction for processing a dequeued message.
  • Messaging span data, especially:
    • messaging.system (for example kafka)
    • messaging.destination.name (queue/topic name)
    • messaging.message.id
    • messaging.message.retry.count
    • messaging.message.body.size
    • messaging.message.envelope.size
    • messaging.message.receive.latency
  • Distributed tracing headers (sentry-trace and baggage) link producer-side work to consumer-side processing.
  • Queue receive latency is the time a message spent waiting between publish/enqueue and processing. For Java Kafka, this comes from the sentry-task-enqueued-time header that the producer writes and the consumer reads.

The Queues UI is not backed by a separate Java event type. The Java SDK contributes data through spans/transactions with the expected operations, trace context, statuses, and messaging attributes.

Java SDK implementation

Queue tracing is opt-in. SentryOptions.isEnableQueueTracing() defaults to false and can be enabled with setEnableQueueTracing(true) or external config key enable-queue-tracing (sentry.enable-queue-tracing in Spring Boot). Captured queue spans/transactions still depend on tracing being enabled and sampled.

Kafka support lives in sentry-kafka:

  • SentryKafkaProducer.wrap(Producer) wraps Kafka Producer.send(...) calls.
    • Creates a queue.publish child span when there is an active span.
    • Sets messaging.system=kafka and messaging.destination.name=<topic>.
    • Injects sentry-trace, baggage, and sentry-task-enqueued-time headers.
    • Still injects tracing/enqueued-time headers when queue tracing is enabled but there is no active span, so background producers can link to consumers.
    • Finishes the span from the Kafka callback with OK or INTERNAL_ERROR.
  • SentryKafkaConsumerTracing.withTracing(record, callback) is the manual raw-Kafka consumer helper.
    • Forks root scopes for the processing lifecycle and makes them current.
    • Continues the trace from Kafka headers.
    • Starts a queue.process transaction bound to scope when tracing is enabled.
    • Sets Kafka messaging data, body size, retry count, and receive latency when available.
    • Finishes with OK or INTERNAL_ERROR and never lets instrumentation failures break customer processing.

Read the full file on GitHub · 83 lines

Changes

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.

  1. 1mo ago First seen · 83 lines · 10 tokens per session scan A 0cff65e1784e

Subscribe to this mod's changes

queues is a cursor rule published in the GitHub repository getsentry/sentry-java (1,357 stars, last pushed today), licensed MIT. It adds 10 tokens to every session and 1,220 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-09-03.