- We want to observe our systems. Sometimes we may want a log with messages in it, other times just a metric is fine. BUT the times we want either of these can be arbitrary... don't want to have to make a release of an app just because we're in the middle of an incident and want more detailed logs of something.
- Want to untangle next-metrics from express
- BUT ideally want any new thing to be reasonably backwards compatible
- collects both logs & metrics in a unified interface
- decorates with tags
- .log .count .error .time etc
- basically has the n-logger interface
- Can do request tracing too (I have a prototype of how it coudl work in biz-ops-api)
...
- transport layers for each sink we may want to send stuff to. i.e. decouple sending the log somewhere from the actual collection of it
- could be bundled as part of ft-observable, but keeping them as separate plugins help us avoid the spaghettiness that next-metrics suffers from
...
- uses ft-observable and some of the plugins listed above to log the standard metrics we know and love in n-express/next-metrics
- variants for serverless and other frameworks could be developed too
During normal operation most logs could be collected as metrics in graphite/prometheus, with a sample sent to splunk (could also have a convention whereby adding a alwaysLog: true
property means a certain type of log is always sent to splunk. or maybe all errors are logged, but a sample of info)
During an incident an ENV var could toggle sending more/all logs to splunk
Could be a nice project to open source too. Could call it twitcher