With Sentry 8.4 and RavenJS 3.0.4, why might the breadcrumbs parameter be discarded?
Scenario:
try { throw new Error('test error') } catch (e) { Raven.captureException(e); }There are now three error events in Sentry:
The JSON below is from the manually-captured Error('test error').
Here's the JSON from the POST body (RavenJS->Sentry):
{
"breadcrumbs": {
"values": [
{
"category": "sentry",
"event_id": "44d29216b5bd491cacae24612747f506",
"message": "TypeError: $(...).fooltip is not a function",
"timestamp": 1462979789.345
},
{
"category": "sentry",
"event_id": "b17440c6072547cf8fed1e8979afec03",
"message": "TypeError: $(...).fooltip is not a function",
"timestamp": 1462979789.348
},
{
"category": "console",
"level": "error",
"message": "TypeError: $(...).fooltip is not a function",
"timestamp": 1462979789.349
},
{
"category": "xhr",
"data": {
"method": "GET",
"status_code": 200,
"url": "https://dev-mclayton.usersys.redhat.com/api/banners"
},
"timestamp": 1462979790.243,
"type": "http"
}
]
},
"culprit": "<anonymous>",
"event_id": "1f85892bd3464c2fbea01050f3cc5b80",
"exception": {
"values": [
{
"stacktrace": {
"frames": [
{
"colno": 14,
"filename": "<anonymous>",
"function": "Object.InjectedScript.evaluate",
"in_app": true,
"lineno": 118
},
{
"colno": 25,
"filename": "<anonymous>",
"function": "Object.InjectedScript._evaluateAndWrap",
"in_app": true,
"lineno": 137
},
{
"colno": 167,
"filename": "<anonymous>",
"function": "Object.InjectedScript._evaluateOn",
"in_app": true,
"lineno": 145
}
]
},
"type": "Error",
"value": "test error"
}
]
},
"extra": {
"session:duration": 291512
},
"logger": "javascript",
"message": "Error: test error",
"platform": "javascript",
"project": "3",
"request": {
"headers": {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
},
"url": "https://dev-mclayton.usersys.redhat.com/"
},
"user": {
"internal": false,
"lang": "en",
"login": ""
}
}
And here's the JSON from the Sentry UI (ie, the JSON (2.0KB) link on the event page):
{
"id": "1f85892bd3464c2fbea01050f3cc5b80",
"project": 3,
"release": null,
"platform": "javascript",
"culprit": "<anonymous> in Object.InjectedScript._evaluateOn",
"message": "Error: test error",
"datetime": "2016-05-11T15:21:18.000000Z",
"time_spent": null,
"tags": [
[
"level",
"error"
],
[
"logger",
"javascript"
],
[
"browser",
"Chrome 50.0"
],
[
"device",
"Other"
],
[
"os",
"Linux"
],
[
"url",
"https://dev-mclayton.usersys.redhat.com/"
],
[
"sentry:user",
"ip:10.13.49.57"
]
],
"errors": [
{
"type": "invalid_data",
"name": "breadcrumbs",
"value": {
"values": [
{
"category": "sentry",
"timestamp": 1462979789.345,
"message": "TypeError: $(...).fooltip is not a function",
"event_id": "44d29216b5bd491cacae24612747f506"
},
{
"category": "sentry",
"timestamp": 1462979789.348,
"message": "TypeError: $(...).fooltip is not a function",
"event_id": "b17440c6072547cf8fed1e8979afec03"
},
{
"category": "console",
"timestamp": 1462979789.349,
"message": "TypeError: $(...).fooltip is not a function",
"level": "error"
},
{
"category": "xhr",
"timestamp": 1462979790.243,
"type": "http",
"data": {
"url": "https://dev-mclayton.usersys.redhat.com/api/banners",
"status_code": 200,
"method": "GET"
}
}
]
}
},
{
"url": "<anonymous>",
"type": "js_no_source"
},
{
"url": "<anonymous>",
"type": "js_no_source"
},
{
"url": "<anonymous>",
"type": "js_no_source"
}
],
"extra": {
"session:duration": 291512
},
"fingerprint": [
"{{ default }}"
],
"received": 1462980078,
"sdk": {
"version": "3.0.4",
"name": "raven-js"
},
"sentry.interfaces.Exception": {
"exc_omitted": null,
"values": [
{
"stacktrace": {
"has_system_frames": false,
"frames": [
{
"function": "Object.InjectedScript.evaluate",
"abs_path": "<anonymous>",
"in_app": false,
"lineno": 118,
"colno": 14,
"filename": "<anonymous>"
},
{
"function": "Object.InjectedScript._evaluateAndWrap",
"abs_path": "<anonymous>",
"in_app": false,
"lineno": 137,
"colno": 25,
"filename": "<anonymous>"
},
{
"function": "Object.InjectedScript._evaluateOn",
"abs_path": "<anonymous>",
"in_app": false,
"lineno": 145,
"colno": 167,
"filename": "<anonymous>"
}
],
"frames_omitted": null
},
"type": "Error",
"value": "test error",
"module": null
}
]
},
"sentry.interfaces.Http": {
"url": "https://dev-mclayton.usersys.redhat.com/",
"headers": [
[
"User-Agent",
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36"
]
]
},
"sentry.interfaces.User": {
"data": {
"lang": "en",
"login": "",
"internal": false
},
"ip_address": "10.13.49.57"
},
"type": "error",
"version": "7"
}
Thanks in advance!
I'm closing this as a dupe of #3209.
But to reiterate, there's not a problem here. Just version 8.4 of Sentry doesn't support breadcrumbs, so the extra data that's being sent is just triggering an error in the UI. This error can just be ignored because the breadcrumbs data is being ignored anyways.
Breadcrumbs will be released in Sentry 8.5.
I opened a PR to just ignore this data for 8.4.x, see #3212
@mattrobenolt I've tried sentry, version 8.5.0.dev0 (c3e544ff9bee) and I get the same error. Is it expected too?
@bobrik if you upgraded Sentry and saw that issue it sounds like you didn't restart the workers.
I poked around sentry shell and managed to find the issue:
InterfaceValidationError: Unable to determine timestamp for crumb
My timestamp is 2016-05-17T15:02:37+01:00, but sentry expects it to be UTC (with Z).
I'm seeing this error in the hosted version of Sentry (Sentry 8.14.0.dev0 at this time). Am I holding it wrong? :smile:
@bascht Most likely. :) Can you post the full error?
@mattrobenolt I dug a bit deeper and as we still have a platform with an old Prototype.js version up, we stumbled into https://forum.sentry.io/t/why-all-my-events-are-unlabeled-event-and-have-discarded-invalid-value-for-exception-and-breadcrumb/300/4
Manually patching Prototype.js's broken Array.prototype.toJSONimplementation did the trick.
I am not proud. 馃拑
Most helpful comment
I'm closing this as a dupe of #3209.
But to reiterate, there's not a problem here. Just version 8.4 of Sentry doesn't support breadcrumbs, so the extra data that's being sent is just triggering an error in the UI. This error can just be ignored because the breadcrumbs data is being ignored anyways.
Breadcrumbs will be released in Sentry 8.5.
I opened a PR to just ignore this data for 8.4.x, see #3212