theclimatecorporation / clj-newrelic Goto Github PK
View Code? Open in Web Editor NEWNew Relic integration for Clojure
License: Other
New Relic integration for Clojure
License: Other
Hi, great use of macros!, just one little detail, I tried defn-traced
but I didn't get the transactions in New Relic's dashboard so I tried the Sean Corfield's strategy and added the dispatcher parameter to the Trace annotation Trace {:dispatcher true}
and it worked, so I guess something like defn-dispatcher
with the dispatcher parameter set to true
could be a workaround.
I'm not familiar enough with Clojure yet to know if maybe I've just misconfigured something, but locally, this macro works almost exactly as expected, a drop in replacement for defn (self referencing functions fail, but that's a limitation I can handle).
When I try to deploy the app to Heroku, I get an error on the line with "defn-traced" though: Can't define method not in interfaces: invoke, compiling:(file.clj:17:1)
I'm not sure why compiling ahead of time makes a difference here, but it happens locally as well.
Fetching repository, done.
Counting objects: 21, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (11/11), 1.21 KiB, done.
Total 11 (delta 6), reused 0 (delta 0)
-----> Clojure (Leiningen 2) app detected
-----> Installing OpenJDK 1.7...done
-----> Using cached Leiningen 2.4.2
Writing: lein script
-----> Building with Leiningen
Running: lein with-profile production compile :all
(Retrieving com/climate/clj-newrelic/0.1.0/clj-newrelic-0.1.0.pom from clojars)
(Retrieving com/newrelic/agent/java/newrelic-api/3.8.1/newrelic-api-3.8.1.pom from central)
(Retrieving com/newrelic/agent/java/newrelic-api/3.8.1/newrelic-api-3.8.1.jar from central)
(Retrieving com/climate/clj-newrelic/0.1.0/clj-newrelic-0.1.0.jar from clojars)
Jul 24, 2014 20:36:10 +0000 [528 1] com.newrelic INFO: Agent is using Logback
Jul 24, 2014 20:36:10 +0000 [528 1] com.newrelic INFO: Loading configuration file "newrelic.yml"
Compiling adstage.metrics.resource.folder-summary
20:37:05,450 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
20:37:05,450 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
20:37:05,450 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/tmp/build_71860258-f0ac-4a7a-8ad3-64d5e6e4f0c6/src/logback.xml]
20:37:05,519 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
20:37:05,520 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
20:37:05,527 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
20:37:05,830 |-ERROR in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Could not find an appropriate class for property [context]
20:37:05,852 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
20:37:05,852 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
20:37:05,853 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
20:37:05,854 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@18ba8912 - Registering current configuration as safe fallback point
{"timestamp":"2014-07-24T20:37:05.934Z","level":"WARN","thread":"main","logger":"com.datastax.driver.core.FrameCompressor","message":"Cannot find LZ4 class, you should make sure the LZ4 library is in the classpath if you intend to use it. LZ4 compression will not be available for the protocol.","context":"defa
ult"}
Exception in thread "main" java.lang.IllegalArgumentException: Can't define method not in interfaces: invoke, compiling:(adstage/metrics/resource/folder_summary.clj:17:1)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6651)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.analyze(Compiler.java:6406)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6100)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6644)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.analyze(Compiler.java:6406)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5217)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3846)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6642)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.