guides.py 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. from __future__ import absolute_import
  2. from django.utils.translation import ugettext_lazy as _
  3. # Guide Schema
  4. # id (text, required): unique id
  5. # cue (text): The text used to prompt the user to initiate the guide.
  6. # required_targets (list): An empty list will cause the guide to be shown regardless
  7. # of page/targets presence.
  8. # steps (list): List of steps
  9. # Step Schema
  10. # title (text, required): Title text. Tone should be active.
  11. # message (text, optional): Message text. Should help illustrate how to do a task, not
  12. # just literally what the button does.
  13. # target (text, optional): step is tied to an anchor target. If the anchor doesn't exist,
  14. # the step will not be shown. if the anchor exists but is of type
  15. # "invisible", it will not be pinged but will be scrolled to.
  16. # otherwise the anchor will be pinged and scrolled to. If you'd like
  17. # your step to show always or have a step is not tied to a specific
  18. # element but you'd still like it to be shown, set this as None.
  19. # guide_type (text, optional): "guide" or "tip" (defaults to guide). If it's a tip, the cue won't
  20. # be shown, and you should also specify the fields "cta_text" and "cta_link", which would
  21. # replace the "Was this guide useful" message at the end with the CTA and a dismiss button.
  22. # cta_text (text, conditional): CTA button text on the last step of a tip. Must be present if
  23. # guide_type = tip.
  24. # cta_link (text, conditional): Where the CTA button points to. Must be present if guide_type = tip.
  25. GUIDES = {
  26. 'issue': {
  27. 'id': 1,
  28. 'cue': _('Get a tour of the issue page'),
  29. 'required_targets': ['exception'],
  30. 'steps': [
  31. {
  32. 'title': _('Stacktrace'),
  33. 'message': _(
  34. 'See the sequence of function calls that led to the error, and in some cases '
  35. 'global/local variables for each stack frame.'),
  36. 'target': 'exception',
  37. },
  38. {
  39. 'title': _('Breadcrumbs'),
  40. 'message': _(
  41. 'Breadcrumbs are a trail of events that happened prior to the error. They\'re '
  42. 'similar to traditional logs but can record more rich structured data. '
  43. 'When Sentry is used with web frameworks, breadcrumbs are automatically '
  44. 'captured for events like database calls and network requests.'),
  45. 'target': 'breadcrumbs',
  46. },
  47. {
  48. 'title': _('Tags'),
  49. 'message': _(
  50. 'Tags are arbitrary key-value pairs you can send with an event. Events can be '
  51. 'filtered by tags, allowing you to do things like search for all events from '
  52. 'a specific machine, browser or release. The sidebar on the right shows you '
  53. 'the distribution of tags for all events in this event group.'),
  54. 'target': 'tags',
  55. },
  56. {
  57. 'title': _('Resolve'),
  58. 'message': _(
  59. 'Resolving an issue removes it from the default dashboard view of unresolved '
  60. 'issues. You can ask Sentry to <a href="/settings/account/notifications/" target="_blank"> '
  61. 'alert you</a> when a resolved issue re-occurs.'),
  62. 'target': 'resolve',
  63. },
  64. {
  65. 'title': _('Issue Number'),
  66. 'message': _(
  67. 'This is a unique identifier for the issue and can be included in a commit '
  68. 'message to tell Sentry to resolve the issue when the commit gets deployed. '
  69. 'See <a href="https://docs.sentry.io/learn/releases/" target="_blank">Releases</a> '
  70. 'to learn more.'),
  71. 'target': 'issue_number',
  72. },
  73. {
  74. 'title': _('Issue Tracking'),
  75. 'message': _(
  76. 'Create issues in your project management tool from within Sentry. See a list '
  77. 'of all integrations <a href="https://docs.sentry.io/integrations/" target="_blank">here</a>.'),
  78. 'target': 'issue_tracking',
  79. },
  80. {
  81. 'title': _('Ignore, Delete and Discard'),
  82. 'message': _(
  83. 'Ignoring an issue silences notifications and removes it from your feeds. '
  84. 'Deleting an issue deletes its data and causes a new issue to be created if it '
  85. 'happens again. Delete & Discard (available on the medium plan and higher) '
  86. 'deletes most of the issue\'s data and discards future events matching the '
  87. 'issue before they reach your stream. This is useful to permanently ignore '
  88. 'errors you don\'t care about.'),
  89. 'target': 'ignore_delete_discard',
  90. },
  91. {
  92. 'title': _('Owners'),
  93. 'message': _(
  94. 'Define users or teams that are responsible for specific paths or URLS so '
  95. 'that notifications can be routed to the correct owner. Learn more '
  96. '<a href="https://docs.sentry.io/learn/issue-owners/" target="_blank">here</a>.'),
  97. 'target': 'owners',
  98. },
  99. ],
  100. },
  101. 'releases': {
  102. 'id': 2,
  103. 'cue': _('What are releases?'),
  104. 'required_targets': ['releases'],
  105. 'steps': [
  106. {
  107. 'title': _('Releases'),
  108. 'message': _('A release is a specific version of your code deployed to an '
  109. 'environment. When you tell Sentry about your releases, it can '
  110. 'predict which commits caused an error and who might be a likely '
  111. 'owner.'),
  112. 'target': 'releases',
  113. },
  114. {
  115. 'title': _('Releases'),
  116. 'message': _('Sentry does this by tying together commits in the release, files '
  117. 'touched by those commits, files observed in the stacktrace, and '
  118. 'authors of those files. Learn more about releases '
  119. '<a href="https://docs.sentry.io/learn/releases/" target="_blank">here</a>.'),
  120. 'target': 'releases',
  121. },
  122. ]
  123. },
  124. 'event_issue': {
  125. 'id': 3,
  126. 'cue': _('Learn about the issue stream'),
  127. 'required_targets': ['issues'],
  128. 'steps': [
  129. {
  130. 'title': _('Events'),
  131. 'message': _(
  132. 'When your application throws an error, that error is captured by Sentry as an event.'),
  133. 'target': 'events',
  134. },
  135. {
  136. 'title': _('Issues'),
  137. 'message': _(
  138. 'Individual events are then automatically rolled up and grouped into Issues with other similar events. '
  139. 'A single issue can represent anywhere from one to thousands of individual events, depending on how many '
  140. 'times a specific error is thrown. '),
  141. 'target': 'issues',
  142. },
  143. {
  144. 'title': _('Users'),
  145. 'message': _(
  146. 'Sending user data to Sentry will unlock a number of features, primarily the ability to drill '
  147. 'down into the number of users affected by an issue. '
  148. 'Learn how easy it is to '
  149. '<a href="https://docs.sentry.io/learn/context/#capturing-the-user" target="_blank">set this up </a>today.'),
  150. 'target': 'users',
  151. },
  152. ]
  153. },
  154. # Ideally, this would only be sent if the organization has never
  155. # customized alert rules (as per FeatureAdoption)
  156. 'alert_rules': {
  157. 'id': 5,
  158. 'cue': _('Tips for alert rules'),
  159. 'required_targets': ['alert_conditions'],
  160. 'steps': [
  161. {
  162. 'title': _('Reduce Inbox Noise'),
  163. 'message': _('Sentry, by default, alerts on every new issue via email. '
  164. 'If that\'s too noisy, send the alerts to a service like Slack to '
  165. 'reduce inbox noise.<br><br> Enabling <a href="https://sentry.io/settings/account/notifications/#weeklyReports" target="_blank">'
  166. 'weekly reports</a> can also help you stay on top of issues without '
  167. 'getting overwhelmed.'),
  168. 'target': 'alert_conditions',
  169. },
  170. {
  171. 'title': _('Prioritize Alerts'),
  172. 'message': _('Not all alerts are equally important. Send the important ones to a '
  173. 'service like PagerDuty. <a href="https://blog.sentry.io/2017/10/12/proactive-alert-rules" target="_blank">Learn more</a> '
  174. 'about prioritizing alerts.'),
  175. 'target': 'alert_actions',
  176. },
  177. {
  178. 'title': _('Fine-tune notifications'),
  179. 'message': _('You can control alerts both at the project and the user level. '
  180. 'Go to <a href="/account/settings/notifications/" target="_blank">Account Notifications</a> '
  181. 'to choose which project\'s alert or workflow notifications you\'d like to receive.'),
  182. 'target': None,
  183. },
  184. ],
  185. },
  186. 'alert_reminder_1': {
  187. 'id': 6,
  188. 'guide_type': 'tip',
  189. 'required_targets': ['project_details'],
  190. 'steps': [
  191. {
  192. 'title': _('Alert Rules'),
  193. 'message': _('This project received ${numEvents} events in the last 30 days but doesn\'t have '
  194. 'custom alerts. Customizing alerts gives you more control over how you get '
  195. 'notified of issues. Learn more <a href="https://sentry.io/_/resources/customer-success/alert-rules/?referrer=assistant" target="_blank">here</a>.'),
  196. 'target': 'project_details',
  197. },
  198. ],
  199. 'cta_text': _('Customize Alerts'),
  200. 'cta_link': '/settings/${orgSlug}/projects/${projectSlug}/alerts/rules/',
  201. },
  202. }