ask-sentry 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc6dc184f307c3a0661dbc52d48c8caee86d7a5309ca627993cd37312686509f
4
- data.tar.gz: 5e7484e41f6915948497575f26a28d681da5665fee6f796189498458f4bb1d09
3
+ metadata.gz: a0f702deaabf6efe1d03af832bdfc0fb85489d952520f837af377685e341ca2d
4
+ data.tar.gz: b3e75f93315e5c4c04229d897b601a182f543d3699db62539920f1dd0cf7db7e
5
5
  SHA512:
6
- metadata.gz: 4e2f9dce7c5a47978ecd41fe1696111472158c1e8e5c4f62db6b7d926483a91e8188267b8b27254e422d71d4e3a4831920020da7489a005cfdec816219c4a5d6
7
- data.tar.gz: 3ef0390e2ffa88cc75fdb6b1df2260c1da15a1e5c05548e5f4547899fd05c761309db5b03408835b2c826d9de0c8db420ce54d4f19f53305ad246012e3b9e228
6
+ metadata.gz: 81f4a79409bbbbbfaa81b2aeaf35183e3ab31c13f006b369599870ee98062fc8c371dba0e6eea253fe96f0bd0552f683b1d1371c704df5ec0d98a10a110a66be
7
+ data.tar.gz: 0e97df60449fab6c8a215aa96307ef1f336d1558d29689b3a032d15821477540da8cf98ffef8723252a67bb9222137982b9a2aed83332aa2805c4f3d929ee35b
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ask
4
4
  module Sentry
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: sentry.use_sentry
3
+ description: How to navigate the Sentry API — fetch issues, events, and error details
4
+ ---
5
+
6
+ Use this skill when you need to interact with Sentry — reviewing error issues,
7
+ checking event details, or debugging production errors.
8
+
9
+ ## Step 1: Get the Client
10
+
11
+ ```ruby
12
+ client = Ask::Sentry.client
13
+ ```
14
+
15
+ This returns an authenticated `Faraday::Connection` pointed at
16
+ `https://sentry.io/api/0/`. It expects a valid Sentry auth token resolved
17
+ via `Ask::Auth.resolve(:sentry_token)`.
18
+
19
+ ## Step 2: Explore the Context
20
+
21
+ ```ruby
22
+ Ask::Sentry::Context::DOCS_URL # Sentry API docs
23
+ Ask::Sentry::Context::QUICK_START # Copy-paste examples
24
+ ```
25
+
26
+ The `QUICK_START` has examples for listing issues and events.
27
+
28
+ ## Step 3: Use Convenience Helpers First
29
+
30
+ The gem ships with helpers for the most common operations:
31
+
32
+ ```ruby
33
+ # Recent errors for a project
34
+ issues = Ask::Sentry.recent_errors(organization: "myorg", project: "myapp", limit: 10)
35
+
36
+ # Events for a specific issue
37
+ events = Ask::Sentry.issue_events(ISSUE_ID, limit: 10)
38
+ ```
39
+
40
+ ## Step 4: Raw API Calls
41
+
42
+ For endpoints without convenience helpers:
43
+
44
+ ```ruby
45
+ client = Ask::Sentry.client
46
+
47
+ # List projects
48
+ client.get("projects/")
49
+
50
+ # List issues for a project
51
+ client.get("projects/ORG/PROJECT/issues/", limit: 20, query: "is:unresolved")
52
+
53
+ # Get event details
54
+ client.get("issues/ISSUE_ID/events/latest/")
55
+
56
+ # List releases
57
+ client.get("projects/ORG/PROJECT/releases/")
58
+ ```
59
+
60
+ Sentry's API uses path parameters — the base URL already includes `/api/0/`.
61
+
62
+ ## Step 5: Authentication & Common Errors
63
+
64
+ ```ruby
65
+ Ask::Sentry::Errors.status_code_description(401)
66
+ Ask::Sentry::Errors.status_code_description(429)
67
+ ```
68
+
69
+ Common scenarios:
70
+ - **401**: Token invalid or revoked → regenerate at Sentry auth token settings
71
+ - **403**: Token lacks scope → check token permissions
72
+ - **404**: Wrong org/project slug → verify slugs in Sentry dashboard
73
+ - **429**: Rate limited → wait and retry (Faraday auto-retries 3 times)
74
+
75
+ ## Step 6: Fallback Strategy
76
+
77
+ 1. Reference `Ask::Sentry::Context::DOCS_URL` for the full API reference
78
+ 2. Sentry's API is REST + JSON — standard GET requests with URL path parameters
79
+ 3. Organization and project slugs are required for most endpoints — get them
80
+ from the Sentry dashboard URL (`/organizations/{ORG}/projects/{PROJECT}/`)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-sentry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto
@@ -150,6 +150,7 @@ files:
150
150
  - lib/ask/sentry/context.rb
151
151
  - lib/ask/sentry/error_guide.rb
152
152
  - lib/ask/sentry/version.rb
153
+ - lib/ask/skills/sentry.use_sentry/SKILL.md
153
154
  homepage: https://github.com/ask-rb/ask-sentry
154
155
  licenses:
155
156
  - MIT