Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Azure Function - Custom Events Setup




I have an Azure Function 2.0 (dotnet core) and it requires a custom event to be raised when HTTP trigger is accessed. The problem is having is that temporary I had it working but when i try and deploy it again it now stops.

What I did was the following:

  1. followed
  2. updated the newrelic.config to have the following settings set sendDataOnExit=“true” sendDataOnExitThreshold=“600”

I was wondering what is the proper way to get new relic to work with azure functions. Do you have documentation?



@Anthony.DeGiambattis -

Azure functions are not officially supported and we don’t have any documentation on that.

I know in the past some have had success instrumenting v1.0 function apps.

Here are a couple of thought though:

  1. You’ll need to create custom transactions using the [Transaction] attribute on your method. That attribute comes from the agent’s api assembly. See for details. The agent won’t report data not occurring within a transaction.

  2. Check the New Relic logs directory for the presence of profiler logs and agent logs. The profiler logs will show which methods are being instrumented and the agent logs will show if the data are being collected and reported. There may be diagnostic information in those logs.

  3. I’m not sure if sendDataOnExit and sendDataOnExitThreshold are needed. They may not be if your function app is hosted by a long running process. Those attributes don’t do any harm though. You may want to try setting sendDataOnExitThreshold to a very low value like 10.

Please post back instructions if you find success!