Code Monkey home page Code Monkey logo

ddtakehomeosadvocate's Introduction

How to find my custom metrics

My Datadog Organization name is the same as my name "Danielle Gellis"

You'll see a lot of metrics because of the DD Agent that I had to install to get the free trial started. You can ignore those.

The custom metrics I'm grabbing from GitHub are

- pull_requests.open

The number of pull requests open at the time the metric was grabbed.
This metric can be used by project maintainers to, at a glance, see how many PRs are currently open

- issues.open

The number of issues open at the time the metric was grabbed.


With more time, I would have...

  • If this were a production project, I'd set it up to run once a day to grab these metrics.

  • I would also, of course, remove secrets like the API key from the code and instead have them be environment variables.

  • I would paginate the response I'm getting back from the GitHub API to ensure that we get all event data.

  • I would add tests. I would mock out the http calls and make sure that calling run in index.js a) gets data from getOpenPulls() and getOpenIssues() b) calls submitMetrics with the correct arguments

Some of the Additional Metrics I'd add with more time:

  • Pull requests opened per day

    • This is the number of PRs opened in the last 24 hours. It would most likely be used on a graph that's averaged, to see the average # of open PRs over time. This could give info on things like project popularity and growth over time.
  • Number of pulls by org members/company employees vs. outside contributors

  • Number of Active Recurring Contributors

    • Active Recurring Contributors are people who have contributed more than once over a given timeframe- for example, 3 months
  • Time till close for both PRs and issues

    • This metric would be useful to look at in a few different ways. Thngs like:
      • a single number of days, averaged, from data from the last 3 months or so
      • a graph that would show any times there were outliers (example: maybe the TTC gets especially big during Hacktoberfest and so more resources should be allocated next October)
  • Time till first response for both PRs and issues

    • This would look at the first comment made by someone other than the submitter (or maybe the first comment by someone who's an Maintainer/Admin of the repo )


Note for transparency:

I completed this project in the allotted 3-4 hours, but I am using a previously created template as a base. The template gave me the skeleton of a project with TypeSctipt, Eslint, and Jest hooked up. (There are similar templates available as Node libraries that I could have pulled in, but I prefer my own.)



Other things:

The docs for Datadog's Node.js API Client have a word missing that makes the instructions a bit unclear. So I created an issue for it DataDog/datadog-api-client-typescript#1573 (And will potentially make a PR to fix it, depending on the maintainer's response)



If you'd like to run this code yourself

  • clone this repo locally
  • cd into the folder holding the project
  • add the github and datadog API keys (found in the notes of my submission on Greenhouse) to datadog.ts line 5 and github.ts line 3
  • then run
    • npm install
    • npx tsc
    • npm start

ddtakehomeosadvocate's People

Contributors

danigellis avatar

Watchers

Danielle Gellis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.