Releases: beatlabs/patron
Bug Fixes
[BREAKING CHANGE] Logging Improvement
- Expose logger interface to Patron Service (#259)
As requested we exposed the logger interface to the Patron service so you can plug-in you own logger.
We have also introduced a textual logger based on the standard Go package logger which can be used when constructing the service builder.
Example 3 shows hot to use the new text logger and show also the breaking change fix.
Before we did setup the framework in this way:
err := patron.SetupLogging(name, version)
if err != nil {
fmt.Printf("failed to set up logging: %v", err)
os.Exit(1)
}
kafkaCmp, err := newKafkaComponent(name, kafkaBroker, kafkaTopic, kafkaGroup, amqpURL, amqpExchange)
if err != nil {
log.Fatalf("failed to create processor %v", err)
}
err = patron.New(name, version).WithComponents(kafkaCmp.cmp).Run(context.Background())
if err != nil {
log.Fatalf("failed to create and run service %v", err)
}
Now we create the service builder with the constructor:
service, err := patron.New(name, version, patron.TextLogger())
if err != nil {
fmt.Printf("failed to set up service: %v", err)
os.Exit(1)
}
kafkaCmp, err := newKafkaComponent(name, kafkaBroker, kafkaTopic, kafkaGroup, amqpURL, amqpExchange)
if err != nil {
log.Fatalf("failed to create processor %v", err)
}
err = service.WithComponents(kafkaCmp.cmp).Run(context.Background())
if err != nil {
log.Fatalf("failed to create and run service %v", err)
}
Keep in mind that if no logger is provided it will use the default structured logger:
service, err := patron.New(name, version)
if err != nil {
fmt.Printf("failed to set up service: %v", err)
os.Exit(1)
}
Maintenance
v0.44.0
This is a minor Patron release with no breaking changes from the previous one.
It introduces quality-of-life improvements when starting a Patron application or configuring HTTP components, allows parsing of multivalue headers, and provides fixes in logged fields and the patron-cli utility.
Thanks to @cgkanatsios @astrikos @j0hnsmith @sgarcez for their contributions!
Changelog
Bug Fixes
Bug Fixes
HTTP Server side caching and small fixes
- Distributed tracing: strip query parameters from the operation name (#240)
- Add a tracing log field if an HTTP service returns an error (#242)
- Server side caching (#193)
- Redis Get response in case of missing value (#238)
- AWS SNS/SQS Integration Tests (#219)
- Golangci-lint docker based (#237)
- Added new member, remove others (#231)
Kafka Features and fixes
Kafka broken tests
- Fixed broken tests (#218)
Kafka Client Builders [BREAKING CHANGE]
- Kafka integration tests (#212) Signed-off-by: Sotirios Mantziaris [email protected]
- Add support for Kafka synchronous producer through builder (#197) Signed-off-by: Giuseppe Mazzotta [email protected]