package emf

import "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/emf"

Package emf implements an EMF metrics publisher.

This package is designated as private and is intended for use only by the smithy client runtime. The exported API therein is not considered stable and is subject to breaking changes without notice.

Index

Types

type Entry

type Entry struct {
	// contains filtered or unexported fields
}

Entry represents a log entry in the EMF format.

func NewEntry

func NewEntry(namespace string, serializer metrics.Serializer) Entry

NewEntry creates a new Entry with the specified namespace and serializer.

func (*Entry) AddDimension

func (e *Entry) AddDimension(key string, value string)

AddDimension adds a CW Dimension to the EMF entry.

func (*Entry) AddMetric

func (e *Entry) AddMetric(key string, value float64)

AddMetric adds a CW Metric to the EMF entry.

func (*Entry) AddProperty

func (e *Entry) AddProperty(key string, value interface{})

AddProperty adds a CW Property to the EMF entry. Properties are not published as metrics, but they are available in logs and in CW insights.

func (*Entry) Build

func (e *Entry) Build() (string, error)

Build constructs the EMF log entry as a JSON string.

Source Files

emf.go emf_test_data.go

Version
v1.32.0
Published
Oct 4, 2024
Platform
linux/amd64
Imports
3 packages
Last checked
49 seconds ago

Tools for package owners.