graphite
The graphite-plaintext
codec supports the graphite plaintext format.
The format is similar to the influx
line protocol.
The codec translates a single graphite
measurement line into a structured event.
Example
The native format of a single graphite event line is as follows:
<metric_path> <value> <timestamp>
The equivalent representation as a tremor value:
{
"metric": "my.metric.path",
"value": 7,
"timestamp": 1620649445 // number of seconds since the epoch
}
Supported types
Graphite has only one type, gauge
and supports only numeric values.
Considerations
If timestamp value is -1 it will be replaced with the current time as the event's timestamp.
Tremor uses nanosecond resolution for timestamps, while graphite uses seconds. When encoding, the timestamp will be truncated to seconds.
When decoding, the timestamp will be multiplied by 1_000_000_000
to convert seconds to nanoseconds. In this way processing logic inside
tremor can be agnostic to the resolution of the timestamp in the incoming data but consistent in processing as timestamps should always
be in nanoseconds resolution within tremor itself.