Custom events not reliably showing up from Fargate ECS

I am using Fargate tasks as a replacement for some existing Lambda functions and am looking to mirror the monitoring and alerting I have in place in Lambda.

I followed the instructions to get the newrelic-infra sidecar container running (Install the ECS integration | New Relic Documentation) and also followed the instructions to get the Firelens sidecar running to pipe the logs into New Relic (AWS FireLens plugin for log forwarding | New Relic Documentation). Side question: Is this configuration necessary to push logs from NodeJS?

Main question: I don’t see the Fargate task executions instrumented anywhere in New Relic APM or anywhere else I can find. My solution is to use custom events to track the results of the execution (duration, metadata about the run, success/failure). I call recordCustomEvent in case of either success or failure along with the additional data. Unfortunately, this event only seems to get recorded occasionally - other times I can tell that the task executed successfully from the logs, but the custom event does not appear. My execution times vary between a few seconds to many minutes.

A few questions:

  • How are custom events pushed to New Relic in this configuration? As I understand it, newrelic-infra is the infrastructure agent and the firelens configuration is for logging, so which is handling the custom events?
  • I experimented with startup timeout and shutdown timeout - neither had any effect either on the main image, the newrelic-infra, or in the Firelens image.
  • I was also interested in instrumenting the function as a transaction to get details about external calls, etc. Is this possible? startBackgroundTransaction executes the code, but does not appear to create a transaction anywhere I can find.

Hello @bweber,

I hope you are well!

Thank you for such a detailed post and outlining what steps/docs you have followed. I am going to loop in a support engineer to look over this further as it is a bit out of my scope. The team will get a reply out shortly. Please reach out if you have other questions or concerns and we will be happy to help!

Thanks for the response - I also have case 00054682 open to address this and have been communicating with a support engineer.

Oh perfect, thank you for letting me know @bweber.

Please reach out if we can help with anything else!