zconstants

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

zconstants are special span/event tags that provide context for span transformation in the frontend storage plugin.

Index

Constants

View Source
const (
	LinkedObjectCluster   = "linkedCluster"
	LinkedObjectGroup     = "linkedGroup"
	LinkedObjectResource  = "linkedResource"
	LinkedObjectNamespace = "linkedNamespace"
	LinkedObjectName      = "linkedName"

	// Indicates how the linked trace interacts with the current trace.
	LinkRole = "linkRole"

	// If this tag is nonempty, a virtual span is inserted between the linked objects with the tag value as the name.
	LinkClass = "linkClass"
)

Tags for TraceSourceLink spans that indicate the linked object.

View Source
const (
	TraceSourceObject = "object"

	TraceSourceAudit = "audit"
	TraceSourceEvent = "event"
)
View Source
const DummyDuration = time.Second

DummyDuration is the span duration used when the span is instantaneous.

View Source
const LogTypeAttr = Prefix + "logType"

Classifies the type of a log line. Logs without this attribute will not have special treatment.

View Source
const NotPseudo = Prefix + "notPseudo"

Indicates that the current span is not pseudo. Used to optimize trace listing.

This constant is used as both tag key and value.

View Source
const Prefix = "zzz-"

All tags with this prefix are not rendered.

View Source
const PseudoType = Prefix + "pseudoType"

Indicates that the current span is a pseudospan that can be folded or flattened. The value is the folding type.

View Source
const SpanName = Prefix + "kelemetryName"

The value replaces the OperationName.

View Source
const TraceSource = Prefix + "traceSource"

Identifies that the span represents an actual event (rather than as a pseudospan).

Variables

This section is empty.

Functions

func KeyToSpanTags

func KeyToSpanTags(key utilobject.Key) map[string]string

func KnownTraceSources

func KnownTraceSources(withPseudo bool) []string

func LinkedKeyFromSpan

func LinkedKeyFromSpan(span *model.Span) (utilobject.Key, bool)

func ObjectKeyFromSpan

func ObjectKeyFromSpan(span *model.Span) utilobject.Key

func TagLinkedObject

func TagLinkedObject(tags map[string]string, ln LinkRef)

func VersionedKeyToSpanTags

func VersionedKeyToSpanTags(key utilobject.VersionedKey) map[string]string

Types

type LinkRef

type LinkRef struct {
	Key   utilobject.Key
	Role  LinkRoleValue
	Class string
}

type LinkRoleValue

type LinkRoleValue string
const (
	// The current trace is a child trace under the linked trace
	LinkRoleParent LinkRoleValue = "parent"

	// The linked trace is a child trace under the current trace.
	LinkRoleChild LinkRoleValue = "child"
)

func ReverseLinkRole

func ReverseLinkRole(role LinkRoleValue) LinkRoleValue

Determines the role of the reverse link.

type LogType

type LogType string
const (
	LogTypeRealError      LogType = "realError"
	LogTypeRealVerbose    LogType = "realVerbose"
	LogTypeKelemetryError LogType = "kelemetryError"
	LogTypeObjectSnapshot LogType = "audit/objectSnapshot"
	LogTypeObjectDiff     LogType = "audit/objectDiff"
	LogTypeEventMessage   LogType = "event/message"
)

type PseudoTypeValue

type PseudoTypeValue string
const (
	// Root span in an object trace.
	PseudoTypeObject PseudoTypeValue = "object"
	// Indicate that another trace shall be included.
	PseudoTypeLink PseudoTypeValue = "link"
	// A virtual span synthesized in the frontend when link class is nonempty.
	PseudoTypeLinkClass PseudoTypeValue = "linkClass"
)

Jump to

Keyboard shortcuts

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