Help us shape the future of Go! Take the 2026 Go Developer Survey

structuredlogscommon

package
v1.300066.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 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 de-duped EMF rules. Prerequisites: 1. Rules are with same namespace 2. 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