graphql-engine/server/src-lib/Hasura/Eventing
Naveen Naidu f55df228fe Server: Add Event Trigger Metrics
- [x] **Event Triggers Metrics**
  - [x] Distribution of size of event trigger fetches / Number of events fetched in the last `event trigger fetch`
  - [x] Event Triggers: Number of event trigger HTTP workers in process
  - [x]  Event Triggers: Avg event trigger lock time (if an event has been fetched but not processed because http worker is not free)

#### Sample response
The metrics can be viewed from the `/dev/ekg` endpoint

```json
{
"num_events_fetched":{
      "max":0,
      "mean":0,
      "count":1,
      "min":0,
      "variance":null,
      "type":"d",
      "sum":0
   },
 "num_event_trigger_http_workers":{
      "type":"g",
      "val":0
   },
"event_lock_time":{
      "max":0,
      "mean":0,
      "count":0,
      "min":0,
      "variance":0,
      "type":"d",
      "sum":0
   },
```

#### Todo
- [ ]  Group similar metrics together (Eg: Group all the metrics related to Event trigger, How do we do it??)

Closes: https://github.com/hasura/graphql-engine-mono/issues/202
GitOrigin-RevId: bada11d871272b04c8a09d006d9d037a8464a472
2021-03-07 05:25:24 +00:00
..
ScheduledTrigger server: simplify JSON instances 2021-01-19 19:15:42 +00:00
Common.hs server: metadata storage abstraction for scheduled triggers 2020-11-25 10:57:38 +00:00
EventTrigger.hs Server: Add Event Trigger Metrics 2021-03-07 05:25:24 +00:00
HTTP.hs server: simplify JSON instances 2021-01-19 19:15:42 +00:00
ScheduledTrigger.hs multitenant: fix cloud schema files 2021-02-22 16:03:07 +00:00