highlight

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

func ConsumeError(ctx context.Context, errorInput interface{}, tags ...string) error

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

func InterceptRequest(r *http.Request) context.Context

InterceptRequest calls InterceptRequestWithContext using the request object's context

func InterceptRequestWithContext

func InterceptRequestWithContext(ctx context.Context, r *http.Request) context.Context

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

func Start

func Start()

Start is used to start the Highlight client's collection service. To use it, run `go highlight.Start()` once in your app.

Types

This section is empty.

Directories

Path Synopsis
gin
go-chi

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL