Code Monkey home page Code Monkey logo

raven-clj's People

Contributors

15joeybloom avatar danielcompton avatar emil0r avatar jsbed avatar kennethkalmer avatar khiemlam avatar kwrooijen avatar liwp avatar martinklepsch avatar mikeclarke avatar minimal avatar piranha avatar sethtrain avatar sfriesel avatar tobias avatar tonsky avatar trptcolin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

raven-clj's Issues

User-defined event-id

In Raven 1.7.0 capture is:

(defn capture
"Send a message to a Sentry server.
event-info is a map that should contain a :message key and optional
keys found at https://docs.getsentry.com/hosted/clientdev/#building-the-json-packet"
[dsn event-info]
(send-packet
(merge (parse-dsn dsn)
{:level "error"
:platform "clojure"
:server_name (.getHostName (InetAddress/getLocalHost))
:ts (.getTime (Date.))}
event-info
{:event_id (generate-uuid)})))

Raven always overrides event_id. Thus retrying capture (e.g. in case of network errors) would create additional events, making capture not idempotent.

It would we nice if the event_id could be passed in by the caller, so the caller could safely retry capture in case of e.g. network errors.

Ensure UTF-8 encoding

On a Windows machine, utf-8 strings passed to raven/capture will not be properly encoded when sent to Sentry.

As far as I can tell, this is because something in the http stack is using the default file encoding.
Temporary workaround:
Launch the JVM with -Dfile.encoding=utf-8

Potential solution:
Explicitly encode the body into utf-8 bytes.

(defn send-packet [{:keys [ts uri project-id key secret] :as packet-info}]
  (let [url (make-sentry-url uri project-id)
        header (make-sentry-header ts key secret)
        body (dissoc packet-info :ts :uri :project-id :key :secret)]
    (http/post url
               {:throw-exceptions false
                :headers {"X-Sentry-Auth" header
                          "User-Agent" sentry-client}
                :body (util/utf8-bytes (json/generate-string body))}))) ; <------

Include full trace, not just root-cause

It's useful to have the full stack of exceptions when sending to sentry, otherwise if you wrap an exception with additional information it is dropped before sending it to sentry.

Missing session

Was wondering if you could help me identify what's wrong here:

screen shot 2016-09-01 at 11 16 50 am

Notice session is showing [object Object]. I've forked the repo and tried printing a string representation of session, and it returns {}.

I'm using wrap-sentry with no options other than the DSN. Any ideas?

Update clj-http depency for Clojure 1.7

Under Clojure 1.7-alpha5 (final 1.7 release is soon) raven-clj causes the following warning:

WARNING: update already refers to: #'clojure.core/update in namespace: clj-http.client, being replaced by: #'clj-http.client/update

It's because of the dependency on clj-http 0.6.4 (very old). This has been fixed in clj-http for some time now.

Thanks!

Network timeout

It looks like the library has no way to set custom network timeouts on capture and by default no timeouts are set by the underlying HTTP lib. In theory, it can lead to long (or even infinite?) pauses in case the sending is performed synchronously.

Body/params is never populated

image

Viewing issues for my Clojure projects on Sentry, the "Body" section always shows {}. It seems like its not capturing the request params at all for some reason? The other sections - "Cookies", "Headers" - are filling correctly (although I do have the issue in #15 for sessions).

wrong raven-clj version reported to sentry

I'm using raven-clj 1.4.3. In sentry's Detail View under "SDK" the version is reported as 1.4.2.
I guess raven-clj.core/sentry-client probably has to be updated (along with some tests, and maybe project.clj)

Include ex-data in GetSentry report for the ring wrapper

Our team has added a feature to include the ex-data in the GetSentry report as an extra parameter in the ring wrapper. I was wondering if this is a feature that would be valuable in the core project. If it is, happy to spin up a PR with the changes. It would look something like this commit without our team's specific configuration. Happy to discuss and adjust the PR as needed. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.