trace

package
v1.7.16 Latest Latest
Warning

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

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

Documentation

Overview

Package trace provides trace functions.

Package trace provides trace functions.

Package trace provides trace function.

Index

Constants

View Source
const (
	StatusOK    = ocodes.Ok
	StatusError = ocodes.Error
)

Variables

View Source
var (
	FromContext = trace.SpanFromContext
)

Functions

func FromGRPCStatus added in v1.0.5

func FromGRPCStatus(code codes.Code, msg string) []attribute.KeyValue

func StatusCodeAborted

func StatusCodeAborted(msg string) []attribute.KeyValue

func StatusCodeAlreadyExists

func StatusCodeAlreadyExists(msg string) []attribute.KeyValue

func StatusCodeCancelled

func StatusCodeCancelled(msg string) []attribute.KeyValue

func StatusCodeDataLoss

func StatusCodeDataLoss(msg string) []attribute.KeyValue

func StatusCodeDeadlineExceeded

func StatusCodeDeadlineExceeded(msg string) []attribute.KeyValue

func StatusCodeFailedPrecondition

func StatusCodeFailedPrecondition(msg string) []attribute.KeyValue

func StatusCodeInternal

func StatusCodeInternal(msg string) []attribute.KeyValue

func StatusCodeInvalidArgument

func StatusCodeInvalidArgument(msg string) []attribute.KeyValue

func StatusCodeNotFound

func StatusCodeNotFound(msg string) []attribute.KeyValue

func StatusCodeOK

func StatusCodeOK(msg string) []attribute.KeyValue

func StatusCodeOutOfRange

func StatusCodeOutOfRange(msg string) []attribute.KeyValue

func StatusCodePermissionDenied

func StatusCodePermissionDenied(msg string) []attribute.KeyValue

func StatusCodeResourceExhausted

func StatusCodeResourceExhausted(msg string) []attribute.KeyValue

func StatusCodeUnauthenticated

func StatusCodeUnauthenticated(msg string) []attribute.KeyValue

func StatusCodeUnavailable

func StatusCodeUnavailable(msg string) []attribute.KeyValue

func StatusCodeUnimplemented

func StatusCodeUnimplemented(msg string) []attribute.KeyValue

func StatusCodeUnknown

func StatusCodeUnknown(msg string) []attribute.KeyValue

Types

type Attributes added in v1.7.1

type Attributes = []attribute.KeyValue

type Span

type Span = trace.Span

func StartSpan

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

type TraceOption

type TraceOption func(*tracer) error

type Tracer

type Tracer interface {
	Start(ctx context.Context) error
}

func New

func New(opts ...TraceOption) (Tracer, error)

Jump to

Keyboard shortcuts

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