Releases: FindHotel/analytics-go
Releases · FindHotel/analytics-go
v3.8.4
What's Changed
- fix: data race in datadog reporter by @xesina in #17
- Revert "Remove public access ACL" by @skr1n in #18
- Remove useless error log message by @victorpoluceno in #19
New Contributors
- @victorpoluceno made their first contribution in #19
Full Changelog: v3.8.3...v3.8.4
v3.8.3
v3.8.2
fix bug in reporter
Add support of accepting aws session in s3client
- Added support for injecting aws s3client when using the
NewS3ClientWithConfig
3.7.0
3.6.0
Performance and memory usage improvement in S3Client
:
-
Doesn't store
Message
before sending it to S3 -
Messages are serialized and gzipped directly to the buffer (before lib was aggregating them in memory)
-
Added a file buffer support, it allows us to put 100 MiB gzipped files (gunzipped 1.5gb) with a really small memory footprint.
Usage of file buffer examples:
package main
import "github.com/FindHotel/analytics-go"
func main() {
client, err := analytics.NewS3ClientWithConfig(analytics.S3ClientConfig{
Config: analytics.Config{},
S3: analytics.S3{
Stage: "dev",
Stream: "tuna",
BatchFilePath: "/tmp/events.tmp"
},
})
if err != nil { // ALWAYS check for errors!
panic(err)
}
// This will go to tuna stream
client.Enqueue(analytics.Track{
UserId: "test-user",
Event: "OfferFound",
})
// Flushes any queued messages and closes the client - DON'T forget this step.
tunaClient.Close()
}
3.5.0
Adds S3 Transport support - the client uploads events directly to S3.
Usage examples:
package main
import "github.com/FindHotel/analytics-go"
func main() {
client, err := analytics.NewS3ClientWithConfig(analytics.S3ClientConfig{
Config: analytics.Config{},
S3: analytics.S3{
Stage: "dev",
Stream: "tuna",
},
},
})
if err != nil { // ALWAYS check for errors!
panic(err)
}
// This will go to tuna stream
client.Enqueue(analytics.Track{
UserId: "test-user",
Event: "OfferFound",
})
// Flushes any queued messages and closes the client - DON'T forget this step.
tunaClient.Close()
}