xtrace

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call[T any](ctx context.Context, spanName string, f func(ctx context.Context) (T, error)) (T, error)

Call 基于otel规范实现一个 call 函数,用于注入任意函数实现链路追踪 使用这个函数的 trace 一定会被记录, 请自行判断是否调用, 或则使用 CallWithSampler

func CallWithSampler added in v1.1.3

func CallWithSampler[T any](ctx context.Context, spanName string, sampler sdktrace.Sampler, f func(ctx context.Context) (T, error)) (T, error)

CallWithSampler 基于 otel 规范实现一个 call 函数,用于注入任意函数实现链路追踪 sdktrace.Sampler 用于判断是否采样

Types

This section is empty.

Jump to

Keyboard shortcuts

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