Analytic for Apps With DGraph Backend

Hello everybody.
Super excited about what can be done with Dgraph. I wanted to ask you if you know if there is a project that I can use with DGraph that gives me analytics like AWS Amplify or Google Analytics for Firebase do.
Thank you in advance.

I don’t see why you could not use either of them with DGraph. Just add it to react (or angular, or whatever your framework is).

J

We recently started using Datadog in our application and even included a few things within our Dgraph GraphQL endpoint/lambdas to send logs to Datadog such as a custom query and mutation that we can just que up anytime we want to log something along with other operations.

type Query {
  log(msg: String!): String @custom(...)
}
type Mutation {
  log(msg: String!): String @custom(...)
}

Then we use it like this alongside other queries/mutations when we want to log something all in a single request

{
  queryStuff { ... }
  log(msg: "Queried some stuff")
}
mutation {
  addStuff(...) { ... }
  log(msg: "Added some stuff")
}

We will probably add it also in some onMutation hooks too in the near future when we have 21.03.

What we really like being able to do more so than that is logging some activity within Dgraph as our source for analytics which directly attaches analytics to the data it is logging.

We will soon be adding some anti-dogpile features to help reduce how often someone is contacted through our services and having analytics within our Dgraph data to know how many times in the last X that a contact has been emailed/called/visited helps to find ones that need to be contacted and those that don’t need to be contacted at any specific time based on contact history.

1 Like

Great Ty

I was playing with dgraph and Grafana+graphql data source (GraphQL Data Source plugin for Grafana | Grafana Labs). It is great for simple statistics, unfortunately there is no easy way to use time based graphs, as you cannot simply get time buckets of aggregated data (like count/sum of events per every hour for 24 hours), or my graphql skills are not sufficient. Still, this is great way to visualize data from dgraph.

1 Like