Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i monitor an Azure Worker Role in NewRelic?

Tags:

azure

newrelic

I raised a ticket, but no response in a week.

Has anyone managed to get this working?

like image 546
RPM1984 Avatar asked Jan 29 '26 02:01

RPM1984


2 Answers

The New Relic agent doesn't do much in worker roles. It can monitor some things — CPU, memory, errors, sql, external interfaces — but not much else. One thing that definitely does not work is the agent api — so no custom metrics or NoticeError.

I had similar issues trying to get answers out of support, but they did eventually confirm their lack of support. Here are some of their answers.

Azure support by the agent

We believe we have a compelling Azure solution, but it doesn't cover all cases. There is certainly still work to be done and it's on our roadmap. We consider the .NET Agent to be a first class citizen and better support for Azure is a top priority. We are also planning to update the API to provide better support for non web-apps.

Specifically in your case:

While it is possible to instrument worker roles and get valuable data from the instrumentation, the data will not appear in most of our graphs. The reason is that most of the graphs depend on work being done as part of web or database transactions. This is often not the case for the work being done in worker roles. We apologize that our initial doc update updated our docs around instrumenting custom applications (non web-apps): https://newrelic.com/docs/dotnet/instrumenting-custom-applications

rather than the doc that you referenced:

https://newrelic.com/docs/dotnet/AgentApi

...we've now updated this. If you have a moment, we'd love your feedback. I feel this is finally well-documented but would like you to feel the same thing.

and from an earlier response

I looked into your API usage and while you are using the API correctly, the unfortunate reality is that our .NET agent does not actually support our full agent API from many .NET apps that are not webapps, and yours appear to fall into that category. How can I tell? Because your apps have no metrics--response time, database, etc. All you'll likely see are throughput and error rate (which I believe you are seeing). We use our own agent API to report the rest of the metrics, and so they don't show up. Further we record stuff like response time explicitly based on a web entry point right now but we are working to fix this. Unfortuantely this fix is pretty far out--I can't even promise an ETA. While researching what was going on, we found that our own docs fail to call out this known issue

Additionally, the integration between the Azure portal (support and billing) and New Relic is quite bad, so I suggest subscribing to New Relic via their own website, rather than the Azure marketplace.

I am mostly a fan of New Relic, and think that overall it is better than alternatives, but their lack of worker role support is potentially a deal breaker for Azure apps. I'll keep an eye on this and update this answer if things change.

like image 119
Simon Munro Avatar answered Jan 30 '26 19:01

Simon Munro


You should be able to use a subset of the available API calls with your instrumented worker role. Particularly RecordMetric, RecordResponseTimeMetric, and IncrementCounter are useful because they work with non-web applications. These metrics can be organized into charts or tables using New Relic Custom Dashboards. Here is the full documentation for the .NET API:

https://newrelic.com/docs/dotnet/the-net-agent-api

like image 39
Wyatt Lindsey Avatar answered Jan 30 '26 19:01

Wyatt Lindsey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!