Merge pull request 'extended logging' (#180) from log-180 into main
Some checks failed
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/frontend Pipeline failed
ci/woodpecker/push/ledger Pipeline failed
ci/woodpecker/push/mntx_gateway Pipeline failed
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/notification Pipeline failed
ci/woodpecker/push/payments_orchestrator Pipeline failed
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline failed
ci/woodpecker/push/fx_oracle Pipeline failed

Reviewed-on: #180
This commit was merged in pull request #180.
This commit is contained in:
2025-12-25 21:04:18 +00:00
3 changed files with 8 additions and 2 deletions

View File

@@ -402,12 +402,12 @@ func SubmitTransfer(ctx context.Context, deps driver.Deps, network shared.Networ
client, err := registry.Client(network.Name) client, err := registry.Client(network.Name)
if err != nil { if err != nil {
logger.Warn("Failed to initialise rpc client", zap.Error(err), zap.String("network", network.Name)) logger.Warn("Failed to initialise RPC client", zap.Error(err), zap.String("network", network.Name))
return "", err return "", err
} }
rpcClient, err := registry.RPCClient(network.Name) rpcClient, err := registry.RPCClient(network.Name)
if err != nil { if err != nil {
logger.Warn("failed to initialise rpc client", zap.String("network", network.Name)) logger.Warn("Failed to initialise RPC client", zap.String("network", network.Name))
return "", err return "", err
} }

View File

@@ -151,6 +151,10 @@ func (d *Driver) EstimateFee(ctx context.Context, deps driver.Deps, network shar
d.logger.Warn("Estimate fee failed", zap.Error(err), d.logger.Warn("Estimate fee failed", zap.Error(err),
zap.String("wallet_ref", wallet.WalletRef), zap.String("wallet_ref", wallet.WalletRef),
zap.String("network", network.Name), zap.String("network", network.Name),
zap.String("from_address", wallet.DepositAddress),
zap.String("from_rpc", rpcFrom),
zap.String("to_address", destination),
zap.String("to_rpc", rpcTo),
) )
} else if result != nil { } else if result != nil {
d.logger.Debug("Estimate fee result", d.logger.Debug("Estimate fee result",

View File

@@ -183,6 +183,8 @@ func (l *loggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, erro
} }
if resp.StatusCode >= 400 { if resp.StatusCode >= 400 {
l.logger.Warn("RPC response error", respFields...) l.logger.Warn("RPC response error", respFields...)
} else if len(bodyBytes) == 0 {
l.logger.Warn("RPC response empty body", respFields...)
} else if len(bodyBytes) > 0 && !json.Valid(bodyBytes) { } else if len(bodyBytes) > 0 && !json.Valid(bodyBytes) {
l.logger.Warn("RPC response invalid JSON", respFields...) l.logger.Warn("RPC response invalid JSON", respFields...)
} }