Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

sentry-elixir-sdk

БесплатноБез исполняемых скриптовНе проверен

Full Sentry SDK setup for Elixir. Use when asked to "add Sentry to Elixir", "install sentry for Elixir", or configure error monitoring, tracing, logging, or…

getsentryот getsentry★ 283 звезды на GitHub

Об этом скилле

All Skills > SDK Setup > Elixir SDK

Sentry Elixir SDK

Opinionated wizard that scans your Elixir project and guides you through complete Sentry setup.

Invoke This Skill When

  • User asks to "add Sentry to Elixir" or "set up Sentry" in an Elixir or Phoenix app
  • User wants error monitoring, tracing, logging, or crons in Elixir or Phoenix
  • User mentions sentry hex package, getsentry/sentry-elixir, or Elixir Sentry SDK
  • User wants to monitor exceptions, Plug errors, LiveView errors, or scheduled jobs

Note: SDK versions and APIs below reflect Sentry docs at time of writing (sentry v13.2.0, requires Elixir ~> 1.13). Always verify against docs.sentry.io/platforms/elixir/ before implementing.


Phase 1: Detect

Run these commands to understand the project before making any recommendations:

# Check existing Sentry dependency
grep -i sentry mix.exs 2>/dev/null

# Detect Elixir version
cat .tool-versions 2>/dev/null | grep elixir
grep "elixir:" mix.exs 2>/dev/null

# Detect Phoenix or Plug
grep -E '"phoenix"|"plug"' mix.exs 2>/dev/null

# Detect Phoenix LiveView
grep "phoenix_live_view" mix.exs 2>/dev/null

# Detect Oban (job queue / crons)
grep "oban" mix.exs 2>/dev/null

# Detect Quantum (cron scheduler)
grep "quantum" mix.exs 2>/dev/null

# Detect OpenTelemetry usage
grep "opentelemetry" mix.exs 2>/dev/null

# Check for companion frontend
ls assets/ frontend/ web/ client/ 2>/dev/null

What to note:

Signal Impact
sentry already in mix.exs? Skip install; go to Phase 2 (configure features)
Phoenix detected? Add Sentry.PlugCapture, Sentry.PlugContext, optionally Sentry.LiveViewHook
LiveView detected? Add Sentry.LiveViewHook to the live_view macro in my_app_web.ex
Oban detected? Recommend Crons + error capture via Oban integration
Quantum detected? Recommend Crons via Quantum integration
OpenTelemetry already present? Tracing setup only needs Sentry.OpenTelemetry.* config
Frontend directory found? Trigger Phase 4 cross-link suggestion

Phase 2: Recommend

Based on what you found, present a concrete recommendation. Don't ask open-ended questions — lead with a proposal:

Recommended (core coverage):

  • ✅ Error Monitoring — always; captures exceptions and crash reports
  • ✅ Logging — Sentry.LoggerHandler forwards crash reports and error logs to Sentry
  • ✅ Tracing — if Phoenix, Plug, or Ecto detected (via OpenTelemetry)

Optional (enhanced observability):

  • ⚡ Crons — detect silent failures in scheduled jobs (Oban, Quantum, or manual GenServer)
  • ⚡ Sentry Logs — forward structured logs to Sentry Logs Protocol (sentry v12.0.0+)

Recommendation logic:

Feature Recommend when...
Error Monitoring Always — non-negotiable baseline
Logging Always — LoggerHandler captures crashes that aren't explicit capture_exception calls
Tracing Phoenix, Plug, Ecto, or OpenTelemetry imports detected
Crons Oban, Quantum, or periodic GenServer/Task patterns detected
Sentry Logs sentry v12.0.0+ in use and structured log search is needed

Propose: "I recommend setting up Error Monitoring + Logging [+ Tracing if Phoenix/Ecto detected]. Want me to also add Crons or Sentry Logs?"


Phase 3: Guide

Option 1: Igniter Installer (Recommended)

You need to run this yourself — the Igniter installer requires interactive terminal input that the agent can't handle. Copy-paste into your terminal:

mix igniter.install sentry

Available since sentry v11.0.0. It auto-configures config/config.exs, config/prod.exs, config/runtime.exs, and lib/my_app/application.ex.

Once it finishes, come back and skip to Verification.

If the user skips the Igniter installer, proceed with Option 2 (Manual Setup) below.


Option 2: Manual Setup

Install

Add to mix.exs dependencies:

# mix.exs
defp deps do
  [
    {:sentry, "~> 13.0"},
    {:finch, "~> 0.21"}
    # Add jason if using Elixir < 1.18:
    # {:jason, "~> 1.4"},
  ]
end
mix deps.get

Configure

# config/config.exs
config :sentry,
  dsn: System.get_env("SENTRY_DSN"),
  environment_name: config_env(),
  enable_source_code_context: true,
  root_source_code_paths: [File.cwd!()],
  in_app_otp_apps: [:my_app]

For runtime configuration (recommended for DSN and release):

# config/runtime.exs
import Config

config :sentry,
  dsn: System.fetch_env!("SENTRY_DSN"),
  release: System.get_env("SENTRY_RELEASE", "my-app@#{Application.spec(:my_app, :vsn)}")

Quick Start — Recommended Init Config

This config enables the most features with sensible defaults:

# config/config.exs
config :sentry,
  dsn: System.get_env("SENTRY_DSN
Полный SKILL.md на GitHub

Установить sentry-elixir-sdk в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/crons.mdreferences/error-monitoring.mdreferences/logging.mdreferences/tracing.md

FAQ

Что делает скилл sentry-elixir-sdk?

Full Sentry SDK setup for Elixir. Use when asked to "add Sentry to Elixir", "install sentry for Elixir", or configure error monitoring, tracing, logging, or crons for Elixir, Phoenix, or Plug applications. Supports Phoenix, Plug, LiveView, Oban, and Quantum.

Как установить скилл sentry-elixir-sdk?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл sentry-elixir-sdk запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить sentry-elixir-sdk с