trace

package
v5.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TracingEnabled = false

TracingEnabled tracks whether tracing is enabled in your application.

Functions

func AddMessageSendEvent

func AddMessageSendEvent(span trace.Span, iid int64, uncompressedLen int64, compressedLen int64) trace.Span

AddMessageSendEvent adds a message send event to the provided span. This function is useful for tracking the sending of messages within a trace.

func BoolAttribute

func BoolAttribute(key string, value bool) attribute.KeyValue

BoolAttribute --

func FromContext

func FromContext(ctx context.Context) trace.Span

FromContext is a wrapper which returns a no-op span if tracing is disabled.

func Int64Attribute

func Int64Attribute(key string, value int64) attribute.KeyValue

Int64Attribute --

func NewContext

func NewContext(parent context.Context, s trace.Span) context.Context

NewContext is a wrapper which returns back the parent context if tracing is disabled.

func StartSpan

func StartSpan(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

StartSpan is a wrapper over the OpenTelemetry package method. This is to allow us to skip calling that particular method if tracing has been disabled.

func StringAttribute

func StringAttribute(key, value string) attribute.KeyValue

StringAttribute --

Types

This section is empty.

Jump to

Keyboard shortcuts

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