Coder Social home page Coder Social logo

inceptum's People

Contributors

brettsnaidero avatar deepaknverma avatar estahn avatar hipages-guoxu avatar ianruan avatar joeruello avatar loc-tran-hipages avatar philip-bui avatar pragone avatar pupudu avatar renovate-bot avatar siyangbi avatar sungardenfly avatar wz185 avatar yulisheng avatar zliangs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

inceptum's Issues

Instrument mysqlclient with logging and metrics

Depends on #6
Instrument the mysql client so that we get per pool:

  • Connection pool stats: established, active, idle, max size
  • Connection borrowing stats: histogram of for how long we borrow connections from the pool
  • Query execution time: histogram of execution time
  • Slow queries: log any query that takes longer than a configurable number of millis (allow for Env override)

Make @types/mocha an peer dependency

I tried to use jest for testing and it makes the build fail because of conflicting global types.

node_modules/@types/mocha/index.d.ts:66:18 - error TS2300: Duplicate identifier 'afterEach'.

66 declare function afterEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void;
                    ~~~~~~~~~

  node_modules/@types/jest/index.d.ts:31:13
    31 declare var afterEach: jest.Lifecycle;
                   ~~~~~~~~~
    'afterEach' was also declared here.

The solution would be to make @types/mocha a peer dependency, rather than adding it directly.

Create swagger middleware

We want swagger to own the routing, but we don't want it to take over the platform.

Build a "simple" middleware for express that uses the Swagger file to manage:

  • Request routing
  • Validation of the request against the schema
  • Validation of the response against the schema

Instrument with metrics:

  • General count of response codes
  • Counts of response codes per path
  • Response time per path
  • Slow requests log: Log any request that takes longer than a specified millis to fulfil (this should be overridable by path)
  • Counter of errors by error class

Update `config` dependency

The config dependency can be updated to v1.28 or later to make the configuration management more flexible.

Add an ignore option to inceptumApp.addDirectory method

Calling addDirectory on a new InceptumApp will add all files in the directory in a recursive manner. However, there can be instances where a user wants to ignore some files or subdirectories in a given path.

For instance, if we write tests alongside the source files, with a .test.js/.spec.js prefix OR if we use a test directory as __test__ /test, inceptum will try to add these files to the app.

On the other hand, inceptum app will crash, if test specific configurations are there in the test files. (configs or globals which will be loaded by a test runner)

Thus there should be an options to Ignore sub-directories/files from the addDirectory method.

Check best redis comms method

The logging framework uses Redis. It currently uses a "list", but also has the option of using a redis channel instead.
Figure out which one is better and if it's channel do the change and test.

Create metrics instrumentation

Create utility classes we can use to push metrics (counters, gauges, histograms, etc) to a system that collects the stats.
We want to go with Promoetheus, se we should use the datadog protocol (extension of statsd protocol)

Test bunyan redis interaction

I've settled on using bunyan as the logging framework as it allows for easier publishing of structure data (in principle).
One thing we need to test is whether the module that publishes logs to redis that is included with bunyan is compatible with the redis plugin of logstash to extract logs and push to ELK.

If this works, the next step will be to create a wrapper around the bunyan config to make it easier to manage.

Create HTTP client library

We want our microservices to be able to talk with other microservices that follow our standards in an easy way.
It should use whatever auto-discovery capabilities we decide upon (reading the swagger of the service, or using HAL, etc)
The client should have a high-level API that resembles a RPC and not a low-level Rest-like API

It should be built on top of a circuit-breaker capable http client

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.