usagov / test-at-home

Other
8 stars 4 forks source link

Track errored and successful submissions #277

Closed hartsick closed 2 years ago

hartsick commented 2 years ago

Notes about how to use here: https://docs.newrelic.com/docs/apm/agents/ruby-agent/api-guides/ruby-custom-metrics/

We are already sending something similar for Smarty and Recaptcha success and failures to give a monitor on service.

Ryan had raised concern of making sure New Relic is non-blocking for response in controller. I believe it is (starts async by default, and says that it's thread safe which suggests to me that it creates a new thread) but having trouble confirming through documentation or code. @mitchellhenke do you happen to know?

Closes #278

mitchellhenke commented 2 years ago

Ryan had raised concern of making sure New Relic is non-blocking for response in controller. I believe it is (starts async by default, and says that it's thread safe which suggests to me that it creates a new thread) but having trouble confirming through documentation or code. @mitchellhenke do you happen to know?

It should be pretty quick and not sending network requests in a blocking fashion, yeah. I haven't dug closely into it, but my understanding is the metrics are added to a datastore in a separate NR process or thread, and it sends all of the collected metrics asynchronously every N seconds.

rahearn commented 2 years ago

not sending network requests in a blocking fashion

this was my concern, so 👍🏻