Skip to content

Commit 0b3ef6a

Browse files
authored
Rename of module to separate from original (#2)
1 parent b5555f2 commit 0b3ef6a

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

README.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# aws-embedded-metrics-golang
22

3-
![test](https://github.com/prozz/aws-embedded-metrics-golang/workflows/test/badge.svg?branch=master)
4-
![golangci-lint](https://github.com/prozz/aws-embedded-metrics-golang/workflows/lint/badge.svg?branch=master)
3+
![test](https://github.com/gaeste/aws-embedded-metrics-golang/workflows/test/badge.svg?branch=master)
4+
![golangci-lint](https://github.com/gaeste/aws-embedded-metrics-golang/workflows/lint/badge.svg?branch=master)
55

6-
Go implementation of AWS CloudWatch [Embedded Metric Format](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Specification.html)
6+
Go implementation of [AWS CloudWatch Embedded Metric Format](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Specification.html).
77

8-
It's aim is to simplify reporting metrics to CloudWatch:
8+
The aim is to simplify reporting metrics to CloudWatch:
99

1010
- using EMF avoids additional HTTP API calls to CloudWatch as metrics are logged in JSON format to stdout
1111
- no need for additional dependencies in your services (or mocks in tests) to report metrics from inside your code
@@ -16,21 +16,32 @@ Supports namespaces, setting dimensions and properties as well as different cont
1616
## Installation
1717

1818
```shell
19-
go get github.com/prozz/aws-embedded-metrics-golang
19+
go get github.com/gaeste/aws-embedded-metrics-golang
2020
```
2121

2222
## Usage
2323

2424
```
2525
emf.New().Namespace("mtg").Metric("totalWins", 1500).Log()
2626
27-
emf.New().Dimension("colour", "red").
28-
MetricAs("gameLength", 2, emf.Seconds).Log()
27+
emf.New().
28+
Dimension("colour", "red").
29+
MetricAs("gameLength", 2, emf.Seconds).
30+
Log()
2931
30-
emf.New().DimensionSet(
32+
emf.New().
33+
DimensionSet(
3134
emf.NewDimension("format", "edh"),
32-
emf.NewDimension("commander", "Muldrotha")).
33-
MetricAs("wins", 1499, emf.Count).Log()
35+
emf.NewDimension("commander", "Muldrotha")
36+
).
37+
MetricAs("wins", 1499, emf.Count).
38+
Log()
39+
40+
metrics := emf.New().
41+
Namespace("mtg").
42+
Metric("totalWins", 1500).
43+
Build()
44+
log.With(metrics).Info("log message with metrics attached as named value pair")
3445
```
3546

3647
You may also use the lib together with `defer`.

emf/logger_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"os"
88
"testing"
99

10+
"github.com/gaeste/aws-embedded-metrics-golang/emf"
1011
"github.com/kinbiko/jsonassert"
11-
"github.com/prozz/aws-embedded-metrics-golang/emf"
1212
)
1313

1414
func TestEmf(t *testing.T) {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/prozz/aws-embedded-metrics-golang
1+
module github.com/gaeste/aws-embedded-metrics-golang
22

33
go 1.20
44

0 commit comments

Comments
 (0)