wazuhsentry

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BeforeSend = func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
	if hint != nil {
		if data, ok := hint.Data.(map[string]interface{}); ok {
			event.Extra, ok = data["fields"].(map[string]interface{})
			event.Level, ok = data["level"].(sentry.Level)
		}
		if hint.OriginalException != nil {
			err := hint.OriginalException
			for i := 0; i < maxErrorDepth && err != nil; i++ {
				event.Exception = append(event.Exception, sentry.Exception{
					Value:      err.Error(),
					Type:       reflect.TypeOf(err).String(),
					Stacktrace: sentry.ExtractStacktrace(err),
				})
				switch previous := err.(type) {
				case interface{ Unwrap() error }:
					err = previous.Unwrap()
				case interface{ Cause() error }:
					err = previous.Cause()
				default:
					err = nil
				}
			}
		}
	}
	return event
}

Functions

func Init

func Init(channel chan *ossec.QueuePosting, options sentry.ClientOptions) error

func NewWrapedCore

func NewWrapedCore(innerCore zapcore.Core) zapcore.Core

Types

type AgentTransport

type AgentTransport struct {
	Project string
	Version string
	// contains filtered or unexported fields
}

func NewAgentTransport

func NewAgentTransport(channel chan *ossec.QueuePosting) (*AgentTransport, error)

func (*AgentTransport) Configure

func (t *AgentTransport) Configure(options sentry.ClientOptions)

func (*AgentTransport) Flush

func (t *AgentTransport) Flush(timeout time.Duration) bool

func (*AgentTransport) SendEvent

func (t *AgentTransport) SendEvent(event *sentry.Event)

type SentryCore

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

func (SentryCore) Check

func (SentryCore) Enabled

func (c SentryCore) Enabled(level zapcore.Level) bool

func (SentryCore) Sync

func (c SentryCore) Sync() error

func (SentryCore) With

func (c SentryCore) With(fld []zapcore.Field) zapcore.Core

func (SentryCore) Write

func (c SentryCore) Write(entry zapcore.Entry, fields []zapcore.Field) error

type SentryEvent

type SentryEvent struct {
	*sentry.Event
	Project string `json:"project,omitempty"`
	Version string `json:"version,omitempty"`
}

type SentryIntegrationEvent

type SentryIntegrationEvent struct {
	ossec.IntegrationEvent
	Sentry interface{} `json:"sentry"`
}

Jump to

Keyboard shortcuts

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