Allow Heroku logs containing dyno metrics to be transformed into useable attributes #35804
Labels
enhancement
New feature or request
needs triage
New item requiring triage
pkg/ottl
processor/transform
Transform processor
Component(s)
OTTL
Is your feature request related to a problem? Please describe.
Heroku emits log lines containing metrics data for the various dyno instances running for an application. These log lines look similar to:
Using the
syslog_receiver
and key_value_parser you can get something almost useable. However, the values are still strings of human readable byte sizes (e.g. "68.20MB") and need to converted to an integer number of bytes in order for them to be useable.Describe the solution you'd like
I would like to be able to parse these byte size values using the transformprocessor, which I am already using to shape other values, and convert them to an integer value of bytes. I propose adding a
ParseBytes
function to OTTL in the same vain asParseJson
andParseCsv
. This could be used with the following config:Describe alternatives you've considered
I've looked at simply striping the units from these values, but the units are not guaranteed to be the same.
ParseBytes
may be an ambiguous or confusing name (though it is what is used by go-humanize). Something likeParsePrettyByteSize
orParseHumanizedByteString
might be clearer.Additional context
No response
The text was updated successfully, but these errors were encountered: