trace

package
v1.999.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package trace provides functions to annotate trace spans with AppSec related information.

Index

Constants

View Source
const BlockedRequestTag = "appsec.blocked"

BlockedRequestTag used to convey whether a request is blocked

Variables

This section is empty.

Functions

func SetAppSecEnabledTags

func SetAppSecEnabledTags(span TagSetter)

SetAppSecEnabledTags sets the AppSec-specific span tags that are expected to be in the web service entry span (span of type `web`) when AppSec is enabled.

func SetEventSpanTags

func SetEventSpanTags(span TagSetter, events []any) error

SetEventSpanTags sets the security event span tags into the service entry span.

func SetTags

func SetTags[V any](span TagSetter, tags map[string]V)

SetTags fills the span tags using the key/value pairs found in `tags`

Types

type NoopTagSetter added in v1.60.0

type NoopTagSetter struct{}

NoopTagSetter is a TagSetter that does nothing. Useful when no tracer Span is available, but a TagSetter is assumed.

func (NoopTagSetter) SetTag added in v1.60.0

func (NoopTagSetter) SetTag(string, any)

type TagSetter

type TagSetter interface {
	SetTag(string, any)
}

TagSetter is the interface needed to set a span tag.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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