New Relic and Lucee

410 views
Skip to first unread message

Andrew Dixon

unread,
Mar 14, 2015, 6:26:46 PM3/14/15
to lu...@googlegroups.com
Hi All,

Has anyone used New Relic with Lucee (or Railo in the past). I've installed it and have data coming through on the APM section however I'm not sure I see how it is particularly useful beyond some very basic metrics,  which while nice are not all that helpful. For example, I go to the "errors" section and it tells me there have been X errors in the last X hours. It groups these errors together as something like:

HttpServerError 500 4
Internal Server Error 1

Ok, so there have been 4 "HTTP Server Error 500" and 1 "Internal Server Error", which itself is surely an "HTTP Server Error 500" as that is what the 500 code means. I click through to the details and all it tells me is basically the same thing, with the addition of the thread name (which is frankly useless), the URL and the referrer. Nothing else helpful at all.

Another example is the Databases section. At first I was like, brilliant, I can see all the queries grouped by the table it is selecting from and ordered by average time, but again once you drill down you can see the "Slow queries" but all the values are question marks (?) because you have parameterised them in your query so all you get is a long list of the same query over and over taking different amounts of time but no way to reproduce because you don't have the actual values.

Either it is next to useless or I'm missing something, some configuration option or something. I feel it must be the latter so wanted to see what others thought.

BTW, before you suggest Fusion Reactor instead, I'm already aware of FR and an FR user on other projects but this particular time I've been given New Relic to use and wanted to make sure I wasn't missing something before going back and saying I need FR instead.

Thanks.

Kind regards,

Andrew
about.me
mso - Lucee - Member

Sean Corfield

unread,
Mar 16, 2015, 1:23:23 AM3/16/15
to lu...@googlegroups.com
I blogged about what we did with New Relic and CFML (Railo). See if this helps:


FWIW, we got more mileage out of instrumenting the Clojure code we call from CFML so we could affect the transaction traces by adding (Java) annotations to calls in our Clojure code:


Sean

Andrew Dixon

unread,
Mar 16, 2015, 3:05:00 AM3/16/15
to lu...@googlegroups.com
Thanks Sean, I will take a look.

Kind regards,

Andrew
about.me
mso - Lucee - Member

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/953935DD-696D-4CD3-8316-B70BBB6FE8E4%40corfield.org.
For more options, visit https://groups.google.com/d/optout.

Chris Blackwell

unread,
Mar 16, 2015, 3:47:49 AM3/16/15
to lu...@googlegroups.com

Hi Andrew,

we've used New relic in our apps in the past. to make error reporting more useful you have to trap the errors in your code and then send them to NR.

We don't use it any more for error reporting as we have a ELK setup now, but we still use NR's free tier to do some basic hardware monitoring.

when I get into the office ill find some code to share.

chris

Chris Blackwell

unread,
Mar 16, 2015, 5:42:09 AM3/16/15
to lu...@googlegroups.com
Hi Andrew,

Here's a few snippets that might help you out

In Application.onRequestStart()

// have new relic report per cfml application, rather than treating the whole
// lucee instance as a single app
getPageContext().getRequest().getOriginalRequest()
   .setAttribute("com.newrelic.agent.APPLICATION_NAME", this.name);
var nr = createObject( "java", "com.newrelic.api.agent.NewRelic" );  
nr.setTransactionName( nullValue(), cgi.script_name & cgi.path_info);
nr.addCustomParameter( "session_id", session.sessionid );
nr.addCustomParameter( "request_id", request.unique_id);
...
nr.addCustomParameter( "whatever", more.is.betterer);


Then in your error handler / logger

// we found this was needed to get at the real exception, 
// otherwise you get a generic cfml runtime error iirc
var cause = exception.getRootCause();
var params = {
        error_id = some_unique_id, 
        type: exception.type ?: 'unknown.error',
        message: exception.message ?: '',
        detail: exception.detail ?: '',
};
NewRelic.noticeError(cause, params);

Hope that helps
Cheers, Chris

Andrew Dixon

unread,
Mar 16, 2015, 11:07:04 AM3/16/15
to lu...@googlegroups.com
Thanks Chris, that looks very helpful.

Kind regards,

Andrew
about.me
mso - Lucee - Member

Phil Sweeney

unread,
Mar 16, 2015, 8:09:04 PM3/16/15
to lu...@googlegroups.com
The issue with the queries not showing detail I believe is a NewRelic config option (check your newrelic.yml file or whatever).  It lets you decide how much you want to share into the cloud (ie masked data).

Andrew Dixon

unread,
Mar 19, 2015, 7:43:20 PM3/19/15
to lu...@googlegroups.com
Thanks for this guys, I've been playing around with this tonight and it's looking good, far better than I was getting with just the basic install. I've pulled together a CFC so I will put together some usage notes and stick it up on Github for all. Will post a link back once it is up.

Kind regards,

Andrew
about.me
mso - Lucee - Member

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Andrew Dixon

unread,
Mar 20, 2015, 9:44:29 AM3/20/15
to lu...@googlegroups.com
Hi All,

If anyone is interested I've now put my component up on Github:


Kind regards,

Andrew
about.me
mso - Lucee - Member

ronnie otts

unread,
Jun 15, 2015, 10:55:08 AM6/15/15
to lu...@googlegroups.com

Check out https://dripstat.com
kind of a new relic clone, but more affordable.

we have been using it on our old railo servers.
putting it on our lucee servers now.

Tom Chiverton

unread,
Jun 16, 2015, 4:02:46 AM6/16/15
to lu...@googlegroups.com
On Monday, June 15, 2015 at 3:55:08 PM UTC+1, ronnie otts wrote:

Check out https://dripstat.com
kind of a new relic clone, but more affordable.

we have been using it on our old railo servers.
putting it on our lucee servers now.

Crikey - a free tier for unlimited hosts... I wonder if the FusionReactor folks know !

Tom

Andrew Dixon

unread,
Jun 16, 2015, 6:29:57 AM6/16/15
to lu...@googlegroups.com
New Relic have a free tier as well.

Kind regards,

Andrew

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Prashant Deva

unread,
Sep 2, 2015, 5:04:39 PM9/2/15
to Lucee
We have added official support for Lucee monitoring in DripStat

We offer similar functionality to NewRelic.

Our native integration with Lucee means you can install and start using it within just a couple minutes.
We will also be keeping our integration updated as versions of Lucee continue to evolve.

Prashant
Reply all
Reply to author
Forward
0 new messages