issueDebugMeta.stories.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. import {Component} from 'react';
  2. import DebugMeta from 'sentry/components/events/interfaces/debugMeta';
  3. import SentryTypes from 'sentry/sentryTypes';
  4. const event = {
  5. id: 'deadbeef',
  6. eventID: 'deadbeef',
  7. groupID: '999',
  8. title: 'thread failing!',
  9. metadata: {
  10. function: 'thread_demo',
  11. type: 'thread_demo',
  12. value: 'Failing!',
  13. },
  14. tags: {},
  15. contexts: {},
  16. entries: [
  17. {
  18. type: 'debugmeta',
  19. data: {
  20. images: [
  21. {
  22. code_file: '/Users/uhoh/code/thread-demo.rs',
  23. image_vmaddr: '0x0',
  24. image_addr: '0x1fe1000',
  25. image_size: 439486848,
  26. type: 'symbolic',
  27. debug_id: '79398811-17a9-3884-9dfb-5552eed86a6f',
  28. features: {
  29. has_debug_info: true,
  30. has_symbols: true,
  31. },
  32. arch: 'x86',
  33. debug_status: 'found',
  34. unwind_status: 'found',
  35. },
  36. {
  37. code_file: '/usr/lib/libSystem.B.dylib',
  38. image_vmaddr: '0x7fff335cb000',
  39. image_addr: '0x7fff3ff1c000',
  40. image_size: 439486848,
  41. type: 'symbolic',
  42. debug_id: 'dfe2454f-2fe3-3b2b-a22b-422947c34c69',
  43. },
  44. {
  45. code_file:
  46. '/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation',
  47. image_vmaddr: '0x7fff279a8000',
  48. image_addr: '0x7fff342f9000',
  49. image_size: 439486848,
  50. type: 'symbolic',
  51. debug_id: '79398803-19x7-3844-9dfb-5516cca93c1a',
  52. debug_status: 'malformed',
  53. unwind_status: 'malformed',
  54. },
  55. {
  56. code_file:
  57. '/System/Library/Frameworks/CoreFoundation.framework/Versions/A/Unused',
  58. image_vmaddr: '0x7fff279a8000',
  59. image_addr: '0x7fff342f9000',
  60. image_size: 439486848,
  61. type: 'symbolic',
  62. debug_id: '79398803-19x7-3844-9dfb-5516cca93c1a',
  63. debug_status: 'unused',
  64. unwind_status: 'unused',
  65. },
  66. ],
  67. },
  68. },
  69. {
  70. type: 'exception',
  71. data: {
  72. values: [
  73. {
  74. stacktrace: {
  75. frames: [{instructionAddr: '0x1fe1000'}],
  76. },
  77. },
  78. ],
  79. },
  80. },
  81. ],
  82. };
  83. const organization = {
  84. id: '1',
  85. slug: 'org-slug',
  86. access: ['project:releases'],
  87. };
  88. class OrganizationContext extends Component {
  89. static childContextTypes = {
  90. organization: SentryTypes.Organization,
  91. };
  92. getChildContext() {
  93. return {organization};
  94. }
  95. render() {
  96. return this.props.children;
  97. }
  98. }
  99. export default {
  100. title: 'Features/Issues/Debug Meta',
  101. };
  102. export const Default = () => (
  103. <div className="section">
  104. <OrganizationContext>
  105. <DebugMeta
  106. event={event}
  107. data={event.entries[0].data}
  108. organization={organization}
  109. projectId="1"
  110. />
  111. </OrganizationContext>
  112. </div>
  113. );
  114. Default.storyName = 'Debug Meta';