structuredlogscommon

package
v1.247349.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricRuleKey = "CloudWatchMetrics"
)

Variables

This section is empty.

Functions

func AddVersion

func AddVersion(metric telegraf.Metric)

Add structured log schema version

func AppendAttributesInFields

func AppendAttributesInFields(fieldName string, fieldValue interface{}, metric telegraf.Metric)

Some attributes are not in type string, use fields to pass these tags

func AttachMetricRule

func AttachMetricRule(metric telegraf.Metric, rules []MetricRule)

func AttachMetricRuleWithDedup added in v1.247346.0

func AttachMetricRuleWithDedup(metric telegraf.Metric, rules []MetricRule)

Append dedupped EMF rules Prerequsite: 1) Rules are with same namespace

  1. Dimensions are pre-sorted

func BuildAttributes

func BuildAttributes(metric telegraf.Metric, structuredLogContent map[string]interface{})

func BuildMeasurements

func BuildMeasurements(metric telegraf.Metric, structuredLogContent map[string]interface{}) error

Types

type MetricAttr

type MetricAttr struct {
	Unit string `json:"Unit,omitempty"`
	Name string `json:"Name"`
}

type MetricRule

type MetricRule struct {
	Metrics       []MetricAttr `json:"Metrics"`
	DimensionSets [][]string   `json:"Dimensions"`
	Namespace     string       `json:"Namespace"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL