I've got a windows service application that I would like to push errors from into New Relic, since we use it for all our other (web application) error monitoring. The New Relic Agent API docs say that this can be done with the NoticeError(System.Exception) method. And according to this doco, I just need to set an environment variable named COR_ENABLE_PROFILING and put two appSetting values in which I've done, but still nothing is showing up in New Relic.
What have I missed?
The NoticeError() API method can send errors from background processes to New Relic, but there are a few configuration settings that can prevent data being sent or recorded correctly. To find the problem I'd need to see your configuration file, the code that's using NoticeError(), some logs from your agent when that code is firing, and preferably your New Relic account. To get all that privately, I'd like to ask you send us a support ticket with us at https://support.newrelic.com/
If you link to this question in the ticket, we can post the fix if it's not specific to your code.
Related
I have an application hosted on Amazon EC2 on a Ubuntu machine, written in Ruby (on Rails), deployed with Capistrano and running on Nginx.
Last friday one module of my application has crashed and nobody in the company noticed until this morning. We spent some money with Facebook and Google ads and received a few hundreds of visits, but nobody created an account due to this bug.
I wonder if this configuration is saving the HTTP requests and its bodies somewhere in a log file. But we didnt explicitly set it, so it would only happen if any of these technologies do it by default.
Do you know whether there is such log or not?
Nope, that wouldn't be anywhere in a usable form (I'm inferring you want to try to create the accounts from request bodies in log files). You'll have the requests themselves in your nginx logs, and the rails logs will contain more info about the request, but as a matter of security, by default, any sensitive information (e.g. passwords) would be scrubbed from them. You may still be able to get some info from them.
To answer your question a little more specifically, the usual place for these logs on your system would be:
/var/log/nginx/
/path/to/your/rails/app/log/production.log
On a separate note, I would recommend looking into an error reporting service like Honeybadger, Airbrake, Raygun, Appsignal, or others so that you don't have silent failures like this moving forward.
I'm using Quartz.NET to fire off a very basic (proof of concept) job that checks for new records and sends e-mails if any exist. I want other programmers to be able to modify their jobs via the jobs file.
However, Quartz.NET never checks the file for changes. From observation, it looks like every time it checks, it tries to store the LAST_MODIFIED_TIME in its database (ADO.NET, MSSQL), and fails to serialize the date. I've tried using both quartz.config and the <quartz> configuration section within the application's standard config file, but both ultimately produce the same error.
I've researched this topic and found an existing issue logged in Quartz.NET's GitHub site, which was posted in 2012. At this point, it looks like the developer is unable to fix this issue. Does anyone have a workaround?
Is it possible to use NewRelic to monitor exceptions in Rails app (like Airbrake)
Bonus: Get notified of other custom errors (e.g. Users getting form validation errors)
Thanks
New Relic does indeed track exceptions, with a free subscription. It will also let you call an API to report custom errors.
Zapier provides a connector to New Relic, that in theory would allow you to send emails when a new relic alert occurs.
Haven't tested myself but it probably let you use New Relic as airbrake.
Here is the link: https://zapier.com/app/explore
I'm using Newrelic for monitoring my rails app status. They ping (GET request I think) our app every 5 minutes. Do you know how to prevent rails from spawning new user session for every request they are making?
Have it ping something that exists in the public directory.
This won't check to make sure that your app is running, but just that the server is up. Assuming the server is up, then your app should be able to create exceptions and New Relic will catch those.
On a new Rails app, for instance, you could have it ping http://rooturl/images/rails.png as that png is in public/images/ by default.
I seem to recall some recent work for specifically this use case -- you might contact New Relic support and see if this has been addressed recently.
Other good answers are already here, but the pinger is documented in full here: https://newrelic.com/docs/alerts/availability-monitoring
I have created a WCF service using the NetMsmq binding for which i created a private queue on my machine and executed the project. This works fine as such and my WCF service is started and accesses the message using the queue in the debugging environment. Now, I wanted to host the service using the windows service and for the same I created a new project and windows installer as well (This service runs under Local System Account). Then I tried installing this windows service using the InstallUtil command through the command prompt. When installation is happening and during the service host opening, I get an exception saying:
There was an error opening the queue. Ensure that MSMQ is installed and running, the queue exists and has proper authorization to be read from. The inner exception may contain additional information.
Inner Exception System.ServiceModel.MsmqException: An error occurred while opening the queue:Access is denied. (-1072824283, 0xc00e0025). The message cannot be sent or received from the queue. Ensure that MSMQ is installed and running. Also ensure that the queue is available to open with the required access mode and authorization.
at System.ServiceModel.Channels.MsmqQueue.OpenQueue()
at System.ServiceModel.Channels.MsmqQueue.GetHandle()
at System.ServiceModel.Channels.MsmqQueue.SupportsAccessMode(String formatName, Int32 accessType, MsmqException& msmqException)
Could anyone suggest the possible solution for the above issue? Am I missing any permissions to be set for the queue as well as the windows service, if so could you suggest where should these permissions be added?
Tom Hollander had a great three-part blog series on using MSMQ from WCF - well worth checking out!
MSMQ, WCF and IIS: Getting them to play nice (Part 1)
MSMQ, WCF and IIS: Getting them to play nice (Part 2)
MSMQ, WCF and IIS: Getting them to play nice (Part 3)
Maybe you'll find the solution to your problem mentioned somewhere!
Yes, it looks like a permissions issue.
Right click on your private queue from the Server Manager, and select Properties. Proceed to the Security tab, and make sure you have the right permissions in there for your Local System Account.
This is also confirmed in Nicholas Allen's article: Diagnosing Common Queue Errors, where the author defines the error code 0xC00E0025 as a permissions problem.
I ran into same problem, here is the solution.
Right click "My Computer" --> Manage. In Computer Management window go to "Services and Applications --> Message Queueing --> ur queue", select ur queue and access properties. Add the user running ur WCF application and give full access. This should solve the issue.
Can simple be that the service can't find the it's queue.
The queue name must exact match the endpoint address.
Example:
net.msmq://localhost/private/wf.listener_srv/service.svc
points to local queue
private$\wf.listener_srv\service.svc
If queue name and endpoint are according to each other, then is most like that the credentials defined on the IIS pool don't grant access to the queue.