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

@@ -8,6 +8,7 @@ import (
"github.com/tech/sendico/edge/callbacks/internal/storage"
"github.com/tech/sendico/pkg/merrors"
"github.com/tech/sendico/pkg/mlogger"
"github.com/tech/sendico/pkg/mutil/mzap"
"go.mongodb.org/mongo-driver/v2/bson"
"go.uber.org/zap"
)
@@ -45,7 +46,7 @@ func (s *service) Resolve(ctx context.Context, eventType string, organizationRef
if err != nil {
s.logger.Warn("Failed to resolve active endpoints",
zap.String("event_type", eventType),
zap.String("organization_ref", organizationRef.Hex()),
mzap.ObjRef("organization_ref", organizationRef),
zap.Error(err),
)
return nil, err
@@ -53,7 +54,7 @@ func (s *service) Resolve(ctx context.Context, eventType string, organizationRef
s.logger.Debug("Resolved active endpoints",
zap.String("event_type", eventType),
zap.String("organization_ref", organizationRef.Hex()),
mzap.ObjRef("organization_ref", organizationRef),
zap.Int("endpoints", len(endpoints)),
)