Documentation ¶
Index ¶
- Constants
- Variables
- func ConsumeError(ctx context.Context, errorInput interface{}, tags ...string) error
- func InterceptRequest(r *http.Request) context.Context
- func InterceptRequestWithContext(ctx context.Context, r *http.Request) context.Context
- func SetFlushInterval(newFlushInterval int)
- func Start()
- type BackendErrorObjectInput
Constants ¶
View Source
const ( HighlightRequestID = "highlightRequestID" HighlightSessionID = "highlightSessionID" )
Variables ¶
View Source
var ( ContextKeys = struct { HighlightRequestID string HighlightSessionID string }{ HighlightRequestID: HighlightRequestID, HighlightSessionID: HighlightSessionID, } )
Functions ¶
func ConsumeError ¶
ConsumeError adds an error to the queue of errors to be sent to our backend. the provided context must have the injected highlight keys from InterceptRequestWithContext.
func InterceptRequest ¶
InterceptRequest calls InterceptRequestWithContext using the request object's context
func InterceptRequestWithContext ¶
InterceptRequestWithContext captures the highlight session and request ID for a particular request from the request headers, adding the values to the provided context.
func SetFlushInterval ¶
func SetFlushInterval(newFlushInterval int)
SetFlushInterval allows you to override the amount of time in which the Highlight client will collect errors before sending them to our backend. - newFlushInterval is an integer representing seconds
Types ¶
type BackendErrorObjectInput ¶ added in v0.3.0
type BackendErrorObjectInput struct { SessionID graphql.String `json:"session_id"` RequestID graphql.String `json:"request_id"` Event graphql.String `json:"event"` Type graphql.String `json:"type"` URL graphql.String `json:"url"` Source graphql.String `json:"source"` StackTrace graphql.String `json:"stackTrace"` Timestamp time.Time `json:"timestamp"` Payload *graphql.String `json:"payload"` }
Click to show internal directories.
Click to hide internal directories.