-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
This is the recommended library to use for metrics reporting to datadog, see https://docs.datadoghq.com/integrations/node
This tracks response times and status codes, and also specificaly tracks GraphQL operations happening in the API.
This is what the logs look like for hyperion (the server-side renderer) and the API:
Note how it adds the GraphQL operation name to the API logs, which should make it easier to debug expensive GraphQL queries and optimize them, and the request pathname to all requests. |
This is based on #4444 and adds tracking of the database connection count and query queue size over time. I'm not sure we should ship this as it happens _very_ often…
…and-queue-length Track database connection count and queue size in DataDog
Forked express-statsd to withspectrum/express-hot-shots to add support for tags in the metrics.
Latest couple commits switch to a fork of That means our metrics now look like this, note that the server name and operation name are moved to the tags (after the
|
This is not quite ready yet, I was recommended to change towards tracking response times and status codes per view rather than per pathname (i.e. |
Latest commit switches to https://github.com/dbader/node-datadog-metrics, which avoids the need to run the DataDog agent and simply pings the DataDog API directly! This works and is live in production for testing |
@mxstbr looks like we just need to clean up flow and merge alpha, then let's merge this! |
Have already learned a bunch of stuff from having this run in production, will rework a little bit to make it more useful for all the workers and then ship! |
This is an anti-pattern, as it'll blow up our DataDog storage costs. Instead, we should be using a logging service like Splunk to dig into specific slow requests after noticing abnormalities in the metrics. Will tackle that next most likely, but this should be a good start! Thanks to the folks in #observability for pointing that out!
The latest commits rework the tracking a bit:
I think this is probably good to ship, going to wait for tests to pass and do a test deploy on alpha first though! |
This has been up on api.alpha for a bit and looks fine, wanna give it a review and then deploy to all the servers today @brianlovin? That'd be great |
This is awesome @mxstbr - are you going to set up some sensible default dashboards in datadog that we can start using going forward? I imagine you have a more clear picture of how you'd like this reporting to be visualized and prioritized. Talked offline: Max to create dashboards for us tomorrow :) |
Status
Deploy after merge (delete what needn't be deployed)
Adds StatsD tracking to our HTTP servers (api and hyperion).
Todo
I'm currently waiting to get the DataDog API key to post this data to DataDog!