Set span status to codes.Error.
This commit is contained in:
parent
07f480582b
commit
86e7c8815f
2
fcm.go
2
fcm.go
|
@ -204,6 +204,8 @@ func (c *Client) doSendRequest(ctx context.Context, req SendRequest, loggerEnabl
|
||||||
|
|
||||||
response, err := c.hc.Do(request)
|
response, err := c.hc.Do(request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
span.SetStatus(codes.Error, err.Error())
|
||||||
|
span.RecordError(err)
|
||||||
return SendResponse{}, errors.WithStack(err)
|
return SendResponse{}, errors.WithStack(err)
|
||||||
}
|
}
|
||||||
defer response.Body.Close()
|
defer response.Body.Close()
|
||||||
|
|
Loading…
Reference in New Issue