instrumentation

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTraceHttpClient

func NewTraceHttpClient(ctx context.Context) *httptrace.ClientTrace

NewTraceHttpClient: Returns a new HTTP client trace for OpenTelemetry using the provided context. Parameters: - ctx: Context for the HTTP client trace. Returns: - A new HTTP client trace.

func NewTraceSpan

func NewTraceSpan(ctx context.Context, name string) (context.Context, trace.Span)

NewTraceSpan: Starts a new trace span with the given context and name, incorporating any baggage attributes into the span attributes. Parameters: - ctx: Context containing baggage attributes. - name: Name of the new trace span. Returns: - Context with the new span added. - The newly created trace span.

func NewTraceSpanWithoutBaggage

func NewTraceSpanWithoutBaggage(ctx context.Context, name string) (context.Context, trace.Span)

NewTraceSpanWithoutBaggage: Starts a new trace span without incorporating any baggage attributes. Parameters: - ctx: Context for the new trace span. - name: Name of the new trace span. Returns: - Context with the new span added. - The newly created trace span.

func RecordSpanError

func RecordSpanError(span trace.Span, err error)

RecordSpanError: Records an error on the provided trace span and sets the status of the span to 'Error'. Parameters: - span: Trace span on which to record the error. - err: Error to record.

Types

This section is empty.

Jump to

Keyboard shortcuts

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