Added logging/metrics information, removed hosted thing in main README. (#183)

This commit is contained in:
Travis Reeder
2016-10-19 12:21:55 -07:00
committed by C Cirello
parent b2f89f707e
commit c95c0dd8f0
6 changed files with 70 additions and 28 deletions

View File

@@ -1,10 +1,12 @@
# IronFunctions Documentation
* [Running IronFunctions](api.md)
* [IronFunctions Options](api.md)
* [API Reference](https://app.swaggerhub.com/api/iron/functions/)
* [Running in Production](production.md)
* [Databases](databases/README.md)
* [Message Queues](mqs/README.md)
* [Running in Production](production.md)
* [Triggers](triggers.md)
* [Logging](logging.md)
* [Metrics](metrics.md)
* [Triggers](triggers.md)
* [Extending IronFunctions](extending.md)

BIN
docs/async-log-full.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

32
docs/logging.md Normal file
View File

@@ -0,0 +1,32 @@
# Logging
There are a few things to note about what IronFunctions logs.
## Logspout
We recommend using [logspout](https://github.com/gliderlabs/logspout) to forward your logs to a log aggregator of your choice.
## Format
All logs are emitted in [logfmt](https://godoc.org/github.com/kr/logfmt) format for easy parsing.
## Call ID
Every function call/request is assigned a `call_id`. If you search your logs, you can track all the activity
for each function call and find errors on a call by call basis. For example, these are the log lines for an aynschronous
function call:
![async logs](async-log-full.png)
Note the easily searchable `call_id=x` format.
```sh
call_id=477949e2-922c-5da9-8633-0b2887b79f6e
```
## Metrics
Metrics are emitted via the logs.
See [Metrics](metrics.md) doc for more information.

View File

@@ -1,10 +1,25 @@
# Metrics
TODO: Explain metrics format. Log Metric Format - LMF(AO)
Metrics are emitted via the logs for few couple of reasons:
1) Everything supports STDERR.
2) User can optionally use them, if not, they just end up in the logs.
3) No particular metrics system required, in other words, all metrics systems can be used via adapters (see below).
## Metrics
The metrics format follows logfmt format and looks like this:
```
metric=someevent value=1 type=count
metric=somegauge value=50 type=gauge
```
It's a very simple format that can be easily parsed by any logfmt parser and passed on to another stats service.
TODO: List all metrics we emit to logs.
## Statsd
The [Logspout Statsd Adapter](https://github.com/iron-io/logspout-statsd) adapter can parse the log metrics and forward
them to any statsd server.

View File

@@ -2,4 +2,4 @@
Triggers are integrations that you can use in other systems to fire off functions in IronFunctions.
TODO:
TODO: