improved logging in callbacks

This commit is contained in:
Stephan D
2026-03-03 01:07:35 +01:00
parent b10ec79fe0
commit bae4cd6e35
45 changed files with 226 additions and 146 deletions

View File

@@ -5,6 +5,7 @@ import (
"strings"
"github.com/tech/sendico/pkg/mlogger"
"github.com/tech/sendico/pkg/mutil/mzap"
moneyv1 "github.com/tech/sendico/pkg/proto/common/money/v1"
endpointv1 "github.com/tech/sendico/pkg/proto/payments/endpoint/v1"
quotationv2 "github.com/tech/sendico/pkg/proto/payments/quotation/v2"
@@ -33,7 +34,7 @@ type quoteIntentLogSummary struct {
func (s *QuotationServiceV2) quotePaymentLogger(req *quotationv2.QuotePaymentRequest) mlogger.Logger {
return s.logger.With(
zap.String("flow_ref", bson.NewObjectID().Hex()),
mzap.ObjRef("flow_ref", bson.NewObjectID()),
zap.String("rpc_method", "QuotePayment"),
zap.String("organization_ref", strings.TrimSpace(req.GetMeta().GetOrganizationRef())),
zap.String("idempotency_key", strings.TrimSpace(req.GetIdempotencyKey())),
@@ -44,7 +45,7 @@ func (s *QuotationServiceV2) quotePaymentLogger(req *quotationv2.QuotePaymentReq
func (s *QuotationServiceV2) quotePaymentsLogger(req *quotationv2.QuotePaymentsRequest) mlogger.Logger {
return s.logger.With(
zap.String("flow_ref", bson.NewObjectID().Hex()),
mzap.ObjRef("flow_ref", bson.NewObjectID()),
zap.String("rpc_method", "QuotePayments"),
zap.String("organization_ref", strings.TrimSpace(req.GetMeta().GetOrganizationRef())),
zap.String("idempotency_key", strings.TrimSpace(req.GetIdempotencyKey())),