irfansofyana
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Xendit Reliability ETL The purpose behind this project is to organize the various data that is necessary so we can easily analyze how reliable we are operating as an engineering organization. The current set of data that we look at are: 1. Incidents 2. PagerDuty 3. Sentry A primer on the above can be found in our [RFC documents](https://drive.google.com/drive/u/1/folders/1ltxy0JbLY53PX7mtwow7Depc2FqflfJ-) so will not be covered in this document. ## Extension There are a few areas which need to be covered before you're able to understand and contribute to this project: 1. Source Data 2. Data Schemas ### Source Data As mentioned above, our current data sources which inform how well we're doing in terms of reliability are taken from (this list will expand): 1. Incidents 2. PagerDuty 3. Sentry 4. Github 5. DataDog #### Incidents Our incidents data comes from [postmortem docs](https://drive.google.com/drive/u/1/folders/0ANGugt3gnJvqUk9PVA). We have created automation for this. Follow these steps below to perform ETL on incidents data, #### Steps - Config `google_client_id`, `google_client_secret`, and `google_client_redirect_uri` in your environment variables. - Run `node scripts/extractors/postmortem.js`. This script will download all postmortem docs in the drive and stored it as `html` files in `raw_data/postmortems`. - Run `node scripts/extractors/incidents.js`. This script will automate the extract stage and stored all the postmortem docs in `clean_data/incidents.json` . ##### Structures ``` [ ... { "incident_name": "<INCIDENT_NAME>", "postmortem_link": "<POSTMORTEM_LINK>", "statuspage_link": "<STATUSPAGE_LINK>", "incident_date": "<INCIDENT_DATE>", "affected_entities": [ { "entity_name": "<AFFECTED_ENTITY_NAME>", "products": [ "<AFFECTED_PRODUCT>", ... ] }, ... ], "root_causes": [ "<ROOT_CAUSE>", ... ], "stats": { "time_of_first_trigger": "<TIME_OF_FIRST_TRIGGER>", "time_of_customer_detect": "<TIME_OF_CUSTOMER_DETECT>", "time_of_internal_detect": "<TIME_OF_INTERNAL_DETECT>", "time_of_recovery": "<TIME_OF_RECOVERY>", "time_of_reconcile": "<TIME_OF_RECONCILE>", "time_of_rca": "<TIME_OF_RCA>", "number_of_impacted_customers": "<NUMBER_OF_IMPACTED_CUSTOMERS>", "number_of_failed_requests": "<NUMBER_OF_FAILED_REQUESTS>", "severity_level": "<SEVERITY_LEVEL>" }, "reliability_gaps": "<RELIABILITY_GAPS>" } ... ] ``` #### PagerDuty The way the process for getting the performance data from PagerDuty is as follows: 1. Run the extractor script in `PAGERDUTY_SECRET=<YOUR_PAGERDUTY_SECRET> node /scripts/extractors/pagerduty.js` 2. Make sure the raw data gets written to: 1. `/raw_data/pagerduty_services/` 2. `/raw_data/pagerduty_incidents/` 3. `/raw_data/pagerduty_log_entries/` 4. `/raw_data/pagerduty_teams/` 5. `/raw_data/pagerduty_users/` #### Sentry Sentry offers us an API to read the information about our usage and statistics. In order to pull this data, you must have access to a Sentry API secret key (we're currently using personal tokens to avoid having to go through the OAuth flow). 1. Run the Sentry projects extractor by running `SENTRY_API_KEY=<YOUR_API_KEY> node scripts/extractors/sentry.js` 2. Check to make sure that the data has been written to: 1. `/raw_data/sentry_projects/` 2. `/raw_data/sentry_issues/` 3. `/raw_data/sentry_teams/` #### Github Our github data will allow us to know whether we've implemented our RFCs correctly. To pull the github data, run the following: 1. Run the extractor by calling `GITHUB_API_KEY=<YOUR_API_KEY> node scripts/extractors/github.js` 2. Check to make sure the data has been written to: 1. `/raw_data/github_teams/` 2. `/raw_data/github_repos/` 3. `/raw_data/github_repo_teams/` 4. `/raw_data/github_repo_hooks/` #### DataDog To pull DataDog data, run the following: 1. Run the extractor by calling `DATADOG_API_KEY=<YOUR_API_KEY> DATADOG_APPLICATION_KEY=<YOUR_APP_KEY> node scripts/extractors/datadog.js` 2. Check to make sure the data has been written to: 1. `/raw_data/datadog_monitors/` 2. `/raw_data/datadog_synthetics/` ### Data Schemas Below is a detailed description of our data schemas that the source data is loaded into to allow us to perform complex queries more efficiently. #### Incidents ![Incidents ERD](resources/erd/Incidents.png) #### PagerDuty ![PagerDuty ERD](resources/erd/PagerDuty.png) #### Sentry ![Sentry ERD](resources/erd/Sentry.png) #### Github ![Github ERD](resources/erd/Github.png) #### DataDog ![DataDog ERD](resources/erd/DataDog.png) #### Developer Survey ![Developer Survey ERD](resources/erd/Developer%20Survey.png) 1. Incidents 1. Incidents 2. AffectedProducts 3. RootCauses 2. PagerDuty 1. PagerDutyTeams 2. PagerDutyUsers 3. PagerDutyUserTeams 4. PagerDutyUserContactMethods 5. PagerDutyServices 6. PagerDutyIncidents 7. PagerDutyLogEntries 3. Sentry 1. SentryProjects 2. SentryTeams 3. SentryIssues 4. SentryIssueEvents 4. Github 1. GithubRepos 2. GithubTeams 3. GithubRepoTeams 4. GithubRepoHooks 5. DataDog 1. DataDogMonitors 2. DataDogSynthetics

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully