backend-conventions
Sentry backend conventions for logging, tracing/spans, span/tag attribute naming, metrics tags, and the options system. Use when adding or editing Python in src/ that logs (logger.info/exception), records metrics (metrics.incr/timing with tags), instruments spans/transactions, calls sentry_sdk.set_tag/set_attribute or set_span_tag/set_span_data, or reads registered options with options.get(). Trigger on "add logging", "log an error", "add a metric", "add a span", "instrument tracing", "set an attribute", "add a tag", "read an option", "LOG005", "LOG011", or metrics tag cardinality questions.
Install
With your agent
Install OMGSkills skill "getsentry/sentry:.agents/skills/backend-conventions" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.
Manual command
git clone https://github.com/getsentry/sentry /tmp/sentry && ln -s /tmp/sentry/.agents/skills/backend-conventions ~/.claude/skills/backend-conventions
From README
Backend Conventions: Logging, Tracing, Metrics, Options Options System Sentry uses a centralized options system where all options are registered in src/sentry/options/defaults.py with required default values. Important: Never add a default value to options.get() calls. All options are registered via register() in defaults.py which requires a default value. The options system always returns the registered default if no value is set, making a second default parameter redundant and potentially inconsistent. Logging Pattern Span / Tag Attribute Names Before inventing a key for sentrysdk.settag/setattribute, setspantag, or setspandata, check whether OTel or Sentry already has a standard name for it in sentryconventions.attributes.ATTRIBUTENAMES. Reusing a convention name keeps the attribute queryable and consistent with what other producers (SDKs, Relay) already emit for the same concept — a bespoke name fragments the same data across two keys.
