Set span status to codes.Error.

This commit is contained in:
Владислав Весельский 2025-01-28 15:18:06 +03:00
parent 07f480582b
commit 86e7c8815f
1 changed files with 2 additions and 0 deletions

2
fcm.go
View File

@ -204,6 +204,8 @@ func (c *Client) doSendRequest(ctx context.Context, req SendRequest, loggerEnabl
response, err := c.hc.Do(request)
if err != nil {
span.SetStatus(codes.Error, err.Error())
span.RecordError(err)
return SendResponse{}, errors.WithStack(err)
}
defer response.Body.Close()