Project

ask-sentry

0.0
Repository is archived
Error context for agents via Sentry for the ask-rb ecosystem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 5.25
~> 3.1
~> 13.0
~> 6.3
~> 3.23

Runtime

~> 2.0
>= 0.3.5
>= 0.12.1
 Project Readme

ask-sentry

Gem Version

⚠️ DEPRECATED: This gem is deprecated. Use Sentry's official MCP server instead. Existing gem installations may continue to work, but this repository will receive no further feature development.

Sentry service context for AI agents in the ask-rb ecosystem. It provides an authenticated HTTP client for the Sentry REST API, metadata constants for system prompts, and a structured error guide for common Sentry API issues.

Installation

gem "ask-sentry"

Quick Start

require "ask-sentry"

# Recent issues for an organization and project
issues = Ask::Sentry.recent_errors(organization: "myorg", project: "myapp", limit: 10)

# Events for a specific issue
events = Ask::Sentry.issue_events(12345, limit: 10)

# Or use the raw client (base URL: https://sentry.io/api/0/)
client = Ask::Sentry.client
client.get("projects/myorg/myapp/issues/")

Authentication

Ask::Sentry.client resolves a token via Ask::Auth.resolve(:sentry_token). Set it in your environment:

export SENTRY_TOKEN=your_token_here

Or add it to ~/.ask/credentials.yml:

sentry_token: your_token_here

Credentials can also come from Rails credentials, a database, or an OAuth provider, depending on your ask-auth configuration. The token is sent as a Bearer token. Create one at sentry.io/settings/account/api/auth-tokens.

Key entry points

  • Ask::Sentry.client - an authenticated Faraday client with base URL https://sentry.io/api/0/. It is wrapped in a proxy that converts HTTP 401 responses into Ask::Auth::InvalidCredential.
  • Ask::Sentry.recent_errors(organization:, project:, limit: 10) - fetch recent issues for a project.
  • Ask::Sentry.issue_events(issue_id, limit: 10) - fetch events for an issue.
  • Ask::Sentry::Errors - structured error knowledge for agents: guidance by exception class, HTTP status descriptions, and rate limit info.
  • Ask::Sentry::DESCRIPTION, DOCS_URL, AUTH_NAME, GEM_NAME, and QUICK_START - metadata constants for system prompts.

Full documentation

The full ask-rb documentation lives at https://ask-rb.github.io/ask-docs. Services: Sentry covers ask-sentry in depth, including the client, error guide, and constants. API reference: https://ask-rb.github.io/ask-docs/reference/api.

Development

bundle install
bundle exec rake test

License

MIT