go_file_not_found.json 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {
  2. "contexts": {
  3. "device": { "arch": "amd64", "num_cpu": 8 },
  4. "os": { "name": "linux" },
  5. "runtime": {
  6. "go_maxprocs": 8,
  7. "go_numcgocalls": 1,
  8. "go_numroutines": 2,
  9. "name": "go",
  10. "version": "go1.12.17"
  11. }
  12. },
  13. "event_id": "af536c31b68a473f97e579507ce155e3",
  14. "level": "error",
  15. "platform": "go",
  16. "sdk": {
  17. "name": "sentry.go",
  18. "version": "0.6.0",
  19. "integrations": [
  20. "ContextifyFrames",
  21. "Environment",
  22. "IgnoreErrors",
  23. "Modules"
  24. ],
  25. "packages": [{ "name": "sentry-go", "version": "0.6.0" }]
  26. },
  27. "server_name": "7337a9a27ac6",
  28. "timestamp": "2020-04-25T19:36:56.584908333Z",
  29. "user": {},
  30. "exception": [
  31. {
  32. "type": "*os.PathError",
  33. "value": "open ./test.txt: no such file or directory",
  34. "stacktrace": {
  35. "frames": [
  36. {
  37. "function": "main",
  38. "module": "main",
  39. "filename": "file-not-found.go",
  40. "abs_path": "/app/file-not-found/file-not-found.go",
  41. "lineno": 25,
  42. "pre_context": [
  43. "",
  44. "\tdefer sentry.Flush(2 * time.Second)",
  45. "",
  46. "\tf, err := os.Open(\"./test.txt\")",
  47. "\tif err != nil {"
  48. ],
  49. "context_line": "\t\tsentry.CaptureException(err)",
  50. "post_context": [
  51. "\t\tlog.Printf(\"reported to Sentry: %s\", err)",
  52. "\t\treturn",
  53. "\t}",
  54. "\tfmt.Println(f.Name(), \"opened successfully\")",
  55. "}"
  56. ],
  57. "in_app": true
  58. }
  59. ]
  60. }
  61. }
  62. ]
  63. }