Skip to content

tomkalesse/aws-embedded-metrics-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-embedded-metrics

Amazon CloudWatch Embedded Metric Format Client Library for Golang.

I tried to match the standards and structure of the existing client libraries provided by Amazon Webs Services - Labs. Suggestions for improvemnts or bug reports are highly welcome. Just open up an issue or PR.

Installation

go get github.com/tomkalesse/aws-embedded-metrics-go@v0.0.9

Usage

import "github.com/tomkalesse/aws-embedded-metrics-go/metrics"

metricsLogger := metrics.CreateMetricsLogger()

metricsLogger.PutMetric("TestCount", 1.0, metrics.Count, metrics.StorageResolutionHigh)
metricsLogger.Flush()

ECS

You need to install a CloudWatchAgent while running ECS (Fragate).

EC2

...

Lambda

...

Local

...

Config

The following keys can be configured as environment variable.

"LOG_GROUP_NAME", "LOG_STREAM_NAME", "ENABLE_DEBUG_LOGGING", "SERVICE_NAME", "SERVICE_TYPE", "AGENT_ENDPOINT", "ENVIRONMENT", "NAMESPACE"

Optionally the prefix AWS_EMF_ can be added to all keys.

About

Amazon CloudWatch Embedded Metric Format Client Library

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages