Skip to content

Instantly share code, notes, and snippets.

@shairyar
Created July 29, 2022 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shairyar/264efc00c7aa5f8db3bc227915aa7e1c to your computer and use it in GitHub Desktop.
Save shairyar/264efc00c7aa5f8db3bc227915aa7e1c to your computer and use it in GitHub Desktop.
query PaginatedMetricsListQuery($appId: String!, $start: DateTime, $end: DateTime, $timeframe: TimeframeEnum, $query: [MetricAggregation!]!) {
app(id: $appId) {
id
metrics {
list(start: $start, end: $end, timeframe: $timeframe, query: $query) {
start
end
rows {
name
tags {
key
value
}
fields {
key
value
}
}
}
}
}
}
@shairyar
Copy link
Author

{
  "appId": "YOUR-APP-ID",
  "start": "2022-07-01T11:00:00Z",
  "end": "2022-07-29T11:05:00Z",
  "query": [
    {
      "name": "NAME-OF-CUSTOM-METRIC",
      "tags": [],
      "fields": [{ "field": "COUNTER", "aggregate": "SUM" }]
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment