Giter VIP home page Giter VIP logo

Comments (15)

dcramer avatar dcramer commented on July 27, 2024

Yep! Most of its minor, but the chained exceptions part is a big deal. I'm
not a C# dev so if someone wants to help with that I'd gladly provide
direction

On Thursday, June 20, 2013, galmeida wrote:

Is there any plans to update client to support v4 of sentry protocol?


Reply to this email directly or view it on GitHubhttps://github.com//issues/26
.

David Cramer
http://disqus.com/zeeg
http://twitter.com/zeeg

from raven-csharp.

galmeida avatar galmeida commented on July 27, 2024

I'm also not a C# dev =) but I'll give it a try...

Do you know what changed from version 2 to 4, besides changing protocol version in http header and the exception/stacktrace structure ?

Thank you.

from raven-csharp.

dcramer avatar dcramer commented on July 27, 2024

@galmeida there's only a few things:

  • We now require sentry_secret be sent with the HTTP header for server-to-server messages
  • platform attribute was added at the top level of the packet (which should be like "csharp" I believe for this client)
  • the stacktrace/exception changes

The only one that is actually required for version 4 is the http header change, the rest are all compatible with version 2 API

from raven-csharp.

galmeida avatar galmeida commented on July 27, 2024

in theory it's done but, for an unknown reason, sentry is not recognising (and therefore storing) the exceptions when I sent a list. If I send using previews format (just on exception) it works.

I'm sending something like this....

X-Sentry-Auth: Sentry sentry_version=4, sentry_client=SharpRaven/1.0, sentry_timestamp=1371752957, sentry_key=xxxx, sentry_secret=xxxx

{
   "event_id":"xxxxxxxxxxxx",
   "project":"xxxx",
   "culprit":"SharpRaven.CaptureTest.Program in PerformDivideByZero",
   "level":"error",
   "timestamp":"2013-06-20T18:18:17.0761719Z",
   "logger":"C#",
   "platform":"csharp",
   "message":"Tentativa de divisão por zero.",
   "server_name":"xxxxxx",
   "exception":[
      {
         "type":"DivideByZeroException",
         "value":"Tentativa de divisão por zero.",
         "module":"SharpRaven.CaptureTest"
      }
   ]
}

from raven-csharp.

dcramer avatar dcramer commented on July 27, 2024

Is this getsentry.com? If so can you give me the team slug and project slug

If not, could you check stderr for when you're sending it as a list and se eif it says anything?

(What you have appears to be correct)

from raven-csharp.

galmeida avatar galmeida commented on July 27, 2024

I'm using getsentry.com

owner: desenv-dt
team: desenv

it's a test account still on trial, so I still have only one team with one project

from raven-csharp.

dcramer avatar dcramer commented on July 27, 2024

Ok I definitely see it discarding the value:

Jun 20 11:19:48 web-2 supervisord: web sentry.coreapi.errors chat-web/desenv Discarded invalid value for interface: exception

We even have tests around this, which is very odd. Can you confirm that that JSON packet is how it was actually being sent?

from raven-csharp.

galmeida avatar galmeida commented on July 27, 2024

I'll capture the request at network level (tcpdump) to double check it, but I'll have to do it tomorow as I'm already out of office today.

from raven-csharp.

galmeida avatar galmeida commented on July 27, 2024

This is what I'm writing/reading to/from request.

->
Accept: application/json
Content-Type: application/json; charset=utf-8
X-Sentry-Auth: Sentry sentry_version=4, sentry_client=SharpRaven/1.0,
sentry_timestamp=1371809748, sentry_key=xxxxxxxxxxxxxxxxxxxxxxxxx, sentry_secret=xxxxxxxxxxxxxxxxx
User-Agent: RavenSharp/1.0

{
  "event_id": "b7462c19adb44fd8a5d25003a03ee942",
  "project": "8245",
  "culprit": "SharpRaven.CaptureTest.Program in PerformDivideByZero",
  "level": "error",
  "timestamp": "2013-06-21T10:15:48.8730468Z",
  "logger": "C#",
  "platform": "csharp",
  "message": "Tentativa de divisão por zero.",
  "server_name": "DTEGALMEIDA",
  "exception": [
    {
      "type": "DivideByZeroException",
      "value": "Tentativa de divisão por zero.",
      "module": "SharpRaven.CaptureTest"
    }
  ]
}
<-
Transfer-Encoding: chunked
Connection: close
Content-Language: en-us
Vary: Accept-Language, Cookie
Strict-Transport-Security: max-age=2592000; includeSubdomains
X-Frame-Options: DENY
Cache-Control: max-age=0
Content-Type: application/json
Date: Fri, 21 Jun 2013 10:15:50 GMT
Expires: Fri, 21 Jun 2013 10:15:50 GMT
Last-Modified: Fri, 21 Jun 2013 10:15:50 GMT
Server: nginx

{"id": "b7462c19adb44fd8a5d25003a03ee942"}
  • is it ok to send exceptions without stacktraces?
  • is it ok to send just one exception in the list?
  • should protocol version 4 accept just one exception, not a list with one exception, just one, like on previews versions? If I send a v4 request with just one exception (not a list) it records the data.
  • Is it possible that my request is understood as a v3 or v2 request? maybe some subtle error on X-Sentry-Auth header?
  • I also tried to use a different exception message, without any non-ascii chars. no success.

from raven-csharp.

dcramer avatar dcramer commented on July 27, 2024

From what I can tell, this must be a bug on the server.

Basically our server versions don't work like typical versions. They're all compatible, its just some versions might enforce minor changes to the communication API.

I'll dig into this later today (or this weekend if I don't get time), but the info here should be enough for me to reproduce

On Friday, June 21, 2013 at 3:40 AM, galmeida wrote:

This is what I'm writing/reading to/from request.
-> Accept: application/json Content-Type: application/json; charset=utf-8 X-Sentry-Auth: Sentry sentry_version=4, sentry_client=SharpRaven/1.0, sentry_timestamp=1371809748, sentry_key=xxxxxxxxxxxxxxxxxxxxxxxxx, sentry_secret=xxxxxxxxxxxxxxxxx User-Agent: RavenSharp/1.0 { "event_id": "b7462c19adb44fd8a5d25003a03ee942", "project": "8245", "culprit": "SharpRaven.CaptureTest.Program in PerformDivideByZero", "level": "error", "timestamp": "2013-06-21T10:15:48.8730468Z", "logger": "C#", "platform": "csharp", "message": "Tentativa de divisão por zero.", "server_name": "DTEGALMEIDA", "exception": [ { "type": "DivideByZeroException", "value": "Tentativa de divisão por zero.", "module": "SharpRaven.CaptureTest" } ] } <- Transfer-Encoding: chunked Connection: close Content-Language: en-us Vary: Accept-Language, Cookie Strict-Transport-Security: max-age=2592000; includeSubdomains X-Frame-Options: DENY Cache-Control: max-age=0 Content-Type: application/json Date: Fri, 21 Jun 2013 10:15:50 GMT Expires: Fri, 21 Jun 2013 10:15:50 GMT Last-Modified: Fri, 21 Jun 2013 10:15:50 GMT Server: nginx {"id": "b7462c19adb44fd8a5d25003a03ee942"}
is it ok to send exceptions without stacktraces?
is it ok to send just one exception in the list?
should protocol version 4 accept just one exception, not a list with one exception, just one, like on previews versions? If I send a v4 request with just one exception (not a list) it records the data.
Is it possible that my request is understood as a v3 or v2 request? maybe some subtle error on X-Sentry-Auth header?
I also tried to use a different exception message, without any non-ascii chars. no success.


Reply to this email directly or view it on GitHub (#26 (comment)).

from raven-csharp.

galmeida avatar galmeida commented on July 27, 2024

please, ping me if/when you have news.

Thank you

from raven-csharp.

dcramer avatar dcramer commented on July 27, 2024

Fixed in getsentry/sentry@78a7ec3, pushing out to getsentry.com now

On Friday, June 21, 2013 at 10:56 AM, galmeida wrote:

please, ping me if/when you have news.
Thank you


Reply to this email directly or view it on GitHub (#26 (comment)).

from raven-csharp.

galmeida avatar galmeida commented on July 27, 2024

David, the first exception in the exception list should be the inner most or the outter most? I'm confused by the " "most recent call first" on getsentry UI.

from raven-csharp.

dcramer avatar dcramer commented on July 27, 2024

It should be the outer most based on execution order (so the first frame
and exception are the most recently executed code)

On Monday, June 24, 2013, galmeida wrote:

David, the first exception in the exception list should be the inner most
or the outter most? I'm confused by the " "most recent call first" on
getsentry UI.


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-19900126
.

David Cramer
http://disqus.com/zeeg
http://twitter.com/zeeg

from raven-csharp.

galmeida avatar galmeida commented on July 27, 2024

OK, I send a pull request latter today.

I also would like to send a second pull request to make raven-csharp compatible with older versions of .net framework (with no functional loss).

from raven-csharp.

Related Issues (20)

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.