raven

package
v0.0.0-...-23fd86d Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package raven is allows correlation information to be added to raven requests.

Deprecated: Use gitlab.com/gitlab-org/labkit/errortracking instead.

Example
package main

import (
	"context"
	"fmt"

	raven "github.com/getsentry/raven-go"
	correlation "gitlab.com/gitlab-org/labkit/correlation/raven"
)

func main() {
	// In reality, this would be passed into the function
	ctx := context.Background()
	err := fmt.Errorf("An error occurred")

	client := raven.DefaultClient
	extra := correlation.SetExtra(ctx, nil)
	packet := raven.NewPacketWithExtra(fmt.Sprintf("error: %v", err), extra)
	client.Capture(packet, nil)
}
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetExtra deprecated

func SetExtra(ctx context.Context, extra raven.Extra) raven.Extra

SetExtra will augment a raven message with the CorrelationID. An existing `extra` can be passed in, but if it's nil a new one will be created.

Deprecated: Use gitlab.com/gitlab-org/labkit/errortracking instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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