Skip to content

Instantly share code, notes, and snippets.

View shairyar's full-sized avatar

shairyar shairyar

View GitHub Profile
```
query uptimeMonitorNotifierQuery($appId: String!) {
app(id: $appId) {
id
notifiers {
id
name
}
}
}
@shairyar
shairyar / app.rb
Created March 17, 2025 12:31
Using Ruby script to start AppSignal
# Requirements:
# bundle install
# bundle exec ruby app.rb
# app.rb
require "appsignal"
# Configure appsignal if needed
Appsignal.configure do |config|
# config.<option> = value
@shairyar
shairyar / query.gql
Last active May 8, 2025 10:46
GraphQL Query to close an incident
mutation updateIncidentMutation($appId: String!, $number: Int!, $state: IncidentStateEnum, $description: String) {
updateIncident(
appId: $appId
number: $number
state: $state
description: $description
) {
... on ExceptionIncident {
id
state
@shairyar
shairyar / OrganizationsQuery.gql
Created June 3, 2025 11:40
Fetch the list of all organizations in AppSignal with users
query OrganizationsQuery {
viewer {
id
organizations {
id
name
users {
id
name
}
@shairyar
shairyar / AssignedIncidentsQuery.gql
Created June 3, 2025 11:42
Fetch the list of tasks assigned to a user
query AssignedIncidentsQuery($appId: String, $limit: Int, $offset: Int, $state: [IncidentStateEnum!], $severity: IncidentSeverityEnum, $query: String, $assigneeIds: [String!]) {
viewer {
id
incidents(
limit: $limit
offset: $offset
appId: $appId
state: $state
severity: $severity
query: $query
@shairyar
shairyar / PaginatedPerformanceIncidentsQuery.gql
Created June 5, 2025 15:01
Fetch performance incidents of logged by AppSignal
query PaginatedPerformanceIncidentsQuery($appId: String!, $namespaces: [String], $limit: Int, $offset: Int) {
app(id: $appId) {
id
paginatedPerformanceIncidents(
namespaces: $namespaces
limit: $limit
offset: $offset
) {
total
rows {