Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry extension #2628

Open
vanesa opened this Issue Mar 7, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@vanesa
Copy link
Member

vanesa commented Mar 7, 2019

Sentry helps devs track, organize and break down errors more efficiently, facilitating their debug process. We want to make it more convenient for developers to access Sentry's error tracking tools directly from the code that is doing the error handling, code such as throw new Error(QUERY), console.log(QUERY), console.error(QUERY) etc..

In the first version, the Sentry extension will render a View logs in Sentry link on each line it detects such error handling code, leading the devs directly to the corresponding Sentry issues stream page.

WIP: https://github.com/sourcegraph/sourcegraph-sentry

PLAN

  • Build extension skeleton
  • Develop the regex to detect error handling code. For the first version it should detect:
    • throw new Error(QUERY)
    • console.log(QUERY)
    • console.error(QUERY)
    • console.warn(QUERY)
    • console.info(QUERY)
    • console.debug(QUERY)
    • log.Printf(QUERY)
    • log.Print(QUERY)
    • log.Println(QUERY)
    • It detects any error handling code specified in the Sentry extension settings
  • Create a test plan
  • Render a link next to lines that contain error handling code
  • Match document repo with Sentry organization
  • Check if document format matches the Sentry extension configuration for file matching
  • Match the document with the corresponding Sentry project that's receiving the logs
  • Generate the correct link to the issues stream page with the org and project information

EXAMPLE USE CASE FOR V0

Error handling code like this one:

throw new Error('cannot determine delta info')

should generate a link that leads to the Sentry issues stream page:

https://sentry.io/organizations/[organization-name]/issues/?project=[project-name]&query=is%3Aunresolved+cannot+determine+delta+info&statsPeriod=14d

image

@vanesa vanesa self-assigned this Mar 7, 2019

@vanesa vanesa added this to the 3.2 milestone Mar 7, 2019

@felixfbecker

This comment has been minimized.

Copy link
Member

felixfbecker commented Mar 15, 2019

I don't think console.log() is tracked by Sentry (probably info() and Println() too)

@nicksnyder nicksnyder modified the milestones: 3.2, 3.3 Mar 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.