hb2

package
v0.0.0-...-2b7dcb4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: BSD-2-Clause Imports: 7 Imported by: 3

Documentation

Overview

package hb2 is a Go package for sending errors to Honeybadger using the official client library

Index

Constants

This section is empty.

Variables

View Source
var IgnoredHeaders = map[string]struct{}{
	"Authorization": struct{}{},
}

Headers that won't be sent to honeybadger.

Functions

This section is empty.

Types

type Config

type Config struct {
	ApiKey      string
	Environment string
	Endpoint    string
}

type HbReporter

type HbReporter struct {
	// contains filtered or unexported fields
}

func NewReporter

func NewReporter(cfg Config) *HbReporter

NewReporter returns a new Reporter instance.

func (*HbReporter) Flush

func (r *HbReporter) Flush()

func (*HbReporter) GetConfig

func (r *HbReporter) GetConfig() *honeybadger.Configuration

exposes honeybadger config for unit tests

func (*HbReporter) ReportWithLevel

func (r *HbReporter) ReportWithLevel(ctx context.Context, level string, err error) error

Report reports the error to honeybadger.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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