fix(supplier): add IP address attribute to payment notification trace

- Include client's IP address in the tracing span attributes during PayNotify
- Enhance observability by adding network context to the trace data
This commit is contained in:
danial
2025-12-11 17:18:02 +08:00
parent af480a23c5
commit 9a80491f88

View File

@@ -121,6 +121,7 @@ func (c *MyselfCardImpl) PayNotify() {
}
ctx, span := otelTrace.Span(ctx, "MyselfCardImpl", "MyselfCardImpl.PayNotify", trace.WithAttributes(
attribute.String("bankOrderId", params["orderNo"]),
attribute.String("ip", c.Ctx.Input.IP()),
))
defer span.End()
localId, err := orderPoolService.GetLocalIdByOrderId(ctx, params["orderNo"])