grailbio / base

A collection of Go utility packages used by GRAIL's tools
Apache License 2.0
89 stars 25 forks source link

Add eventlog, package for semi-structured event logging #12

Closed jcharum closed 4 years ago

jcharum commented 4 years ago

Add the eventlog package which provides semi-structured event logging for convenient analytics. Example usage:

sess := session.NewSession()
cw := cloudwatchlogs.New(sess)
e := NewCloudWatchEventer(cw, "myLogGroup", "myLogStream")
e.Event("rpcRetry", "org", "GRAIL", "retry", 0, "maxRetry", 10)
e.Event("machineStopped", "addr", "192.168.1.1", "duration", 3600.0, "startTime": 1584140534)

These events will then be available in CloudWatch Logs (and therefore easily made available in Athena) for analysis.

jcharum commented 4 years ago

See potential usage in this bigmachine branch.