isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

feat(datadog): add tracing for http requests out #745

Closed seaerchin closed 1 year ago

seaerchin commented 1 year ago

Problem

currently we got no observability/metrics for email logins etc, which makes it hard to monitor what routes are being hit..

Solution

  1. add tag onto datadog trace so that the trace contains info on the user type. because this is set on the trace, we also know the http request path. this could be potentially extended by forwarding our session data object onto our isomer axios instance and tying it into the trace

Testing

Go to this link and observe that you can sort by user.type = <email | github>

to repro on local, just run this branch + hit an endpoint (either through FE or a client)