Documentation
¶
Index ¶
- Constants
- func EnvelopeIdentifier(envelope *protocol.Envelope) string
- func HandleHTTPResponse(response *http.Response, identifier string) bool
- type SendResult
- type SyncMap
- func (s *SyncMap[K, V]) Clear()
- func (s *SyncMap[K, V]) CompareAndDelete(key K, value V)
- func (s *SyncMap[K, V]) Delete(key K)
- func (s *SyncMap[K, V]) Load(key K) (V, bool)
- func (s *SyncMap[K, V]) LoadOrStore(key K, value V) (V, bool)
- func (s *SyncMap[K, V]) Range(f func(key K, value V) bool)
- func (s *SyncMap[K, V]) Store(key K, value V)
Constants ¶
View Source
const MaxDrainResponseBytes = 16 << 10
MaxDrainResponseBytes is the maximum number of bytes that transport implementations will read from response bodies when draining them.
Variables ¶
This section is empty.
Functions ¶
func EnvelopeIdentifier ¶
EnvelopeIdentifier returns a human-readable identifier for the event to be used in log messages. Format: "<description> [<event-id>]".
Types ¶
type SendResult ¶ added in v0.44.0
SendResult holds the outcome of an HTTP request sent to Sentry.
func DoSendRequest ¶ added in v0.44.0
func DoSendRequest(client *http.Client, request *http.Request, identifier string) (*SendResult, error)
DoSendRequest executes an HTTP request, handles response logging, extracts rate limits, and drains+closes the response body.
func (*SendResult) IsSendError ¶ added in v0.44.0
func (r *SendResult) IsSendError() bool
IsSendError returns true if the response indicates a server/client error that should be recorded as send_error for client report outcomes (non-429 failures).
type SyncMap ¶
type SyncMap[K comparable, V any] struct { // contains filtered or unexported fields }
func (*SyncMap[K, V]) CompareAndDelete ¶
func (s *SyncMap[K, V]) CompareAndDelete(key K, value V)
func (*SyncMap[K, V]) LoadOrStore ¶
Click to show internal directories.
Click to hide internal directories.