opentelemetry

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

A set of Java modules that connects OpenTelemetry, an open standard for recording application activity, with Sentry monitoring. It supports automatic or manual collection of traces and sending them to Sentry.

In plain words
What is it for?
Use it to add tracing to Java or Spring applications, connect Java agents or manual instrumentation, and send OpenTelemetry data through Sentry’s OTLP endpoint.
Why use it?
It helps Java applications share tracing data with Sentry without building a separate connection for each instrumentation method.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/getsentry/sentry-java/opentelemetry
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 opentelemetry

README.md
[![agentmods](https://agentmods.dev/badge/rules/getsentry/sentry-java/opentelemetry.svg)](https://agentmods.dev/rules/getsentry/sentry-java/opentelemetry)
Your own site
<a href="https://agentmods.dev/rules/getsentry/sentry-java/opentelemetry"><img src="https://agentmods.dev/badge/rules/getsentry/sentry-java/opentelemetry.svg" alt="Measured on agentmods" height="20"></a>
Per session 5 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,905 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00005 $0.01905
Opus 5 $0.00003 $0.00953
Sonnet 5 $0.00001 $0.00381
Haiku 4.5 $0.00001 $0.00191

Measured today against content hash e68c32a30cfa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

opentelemetry 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 today.

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/opentelemetry.mdc · 98 lines

How it starts

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

Java SDK OpenTelemetry Integration

Overview

The Sentry Java SDK provides comprehensive OpenTelemetry integration through multiple modules:

  • sentry-opentelemetry-core: Core OpenTelemetry integration functionality
  • sentry-opentelemetry-agent: Java Agent-based integration for automatic instrumentation
  • sentry-opentelemetry-agentless: Manual instrumentation without Java agent
  • sentry-opentelemetry-agentless-spring: Spring-specific agentless integration
  • sentry-opentelemetry-bootstrap: Classes that go into the bootstrap classloader when the agent is used. For agentless they are simply used in the applications classloader.
  • sentry-opentelemetry-agentcustomization: Classes that help wire up Sentry in OpenTelemetry. These land in the agent classloader when the agent is used. For agentless they are simply used in the application classloader.
  • sentry-opentelemetry-otlp: Classes for using OpenTelemetry to send spans to Sentry using the OTLP endpoint and have Sentry use OpenTelemetry trace and span id.
  • sentry-opentelemetry-otlp-spring: Spring Boot convenience module that includes sentry-opentelemetry-otlp and the OpenTelemetry Spring Boot starter as transitive dependencies.

Advantages over using Sentry without OpenTelemetry

  • Support for more libraries and frameworks
  • More automated Performance instrumentation (spans) created
    • Using sentry-opentelemetry-agent offers most support
    • Using sentry-opentelemetry-agentless-spring for Spring Boot also has a lot of supported libraries, altough fewer than the agent does
    • Note that sentry-opentelemetry-agentless will not have any OpenTelemetry auto instrumentation
  • Sentry also relies on OpenTelemetry Context propagation to propagate Sentry Scopes, ensuring e.g. that execution flow for a request shares data and does not leak data into other requests.
  • OpenTelemetry also offers better support for distributed tracing since more libraries are supported for attaching tracing information to outgoing requests and picking up incoming tracing information.

Read the full file on GitHub · 98 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. today First seen · 98 lines · 5 tokens per session scan A e68c32a30cfa

Subscribe to this mod's changes

opentelemetry is a cursor rule published in the GitHub repository getsentry/sentry-java (1,349 stars, last pushed today), licensed MIT. It adds 5 tokens to every session and 1,905 once invoked, about $0.0000 per session on Opus 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.