-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample_test.go
42 lines (35 loc) · 1.06 KB
/
example_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package awshoney_test
import (
"github.com/glassechidna/awshoney"
"github.com/honeycombio/beeline-go"
)
func ExampleUsage() {
beeline.Init(beeline.Config{
WriteKey: "yourkey",
Dataset: "yourdataset",
})
awshoney.AddFieldsToClient(nil)
/*
Traces inside AWS Lambda functions have the following fields added:
map[string]string{
"aws.env": "lambda",
"aws.region": "us-east-1",
"aws.lambda.handler": "handlerName",
"aws.lambda.name": "functionName",
"aws.lambda.runtime": "go1.x",
"aws.lambda.version": "$LATEST",
"aws.lambda.memory": "128",
}
Traces inside AWS ECS tasks have the following fields added:
map[string]string{
"aws.env": "ecs",
"aws.region": "us-east-1",
"aws.availability-zone": "us-east-1c",
"aws.ecs.cluster": "default",
"aws.ecs.launchtype": "ec2",
"aws.ecs.task.arn": "arn:aws:ecs:us-east-1:01234567890:task/default/3f3b08db6c984e0f98f05e5d3af242c3",
"aws.ecs.task.family": "worker",
"aws.ecs.task.revision": "4",
}
*/
}