Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct { // an optional json path containing the metric registry object // if left empty, the whole json object is parsed as a metric registry MetricRegistryPath string // an optional json path containing the default time of the metrics // if left empty, or if cannot be parsed the current processing time is used as the time of the metrics TimePath string // time format to use for parsing the time field // defaults to time.RFC3339 TimeFormat string // an optional json path pointing to a json object with tag key/value pairs // takes precedence over TagPathsMap TagsPath string // an optional map containing tag names as keys and json paths to retrieve the tag values from as values // used if TagsPath is empty or doesn't return any tags TagPathsMap map[string]string // an optional map of default tags to use for metrics DefaultTags map[string]string // templating configuration Separator string Templates []string // contains filtered or unexported fields }
Parser parses json inputs containing dropwizard metrics, either top-level or embedded inside a json field. This parser is using gjon for retrieving paths within the json file.
func (*Parser) InitTemplating ¶
InitTemplating initializes the templating support
func (*Parser) Parse ¶
func (p *Parser) Parse(buf []byte) ([]tinymonitor.Metric, error)
Parse parses the input bytes to an array of metrics
func (*Parser) ParseLine ¶
func (p *Parser) ParseLine(line string) (tinymonitor.Metric, error)
ParseLine is not supported by the dropwizard format
func (*Parser) SetDefaultTags ¶
SetDefaultTags sets the default tags
Click to show internal directories.
Click to hide internal directories.