trace

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportEmpty

func ExportEmpty() func(ctx context.Context) (trace.SpanExporter, error)

ExportEmpty 空实现 启用trace但不导出任何上报数据

func NewTraceProvider

func NewTraceProvider(serviceName, version string, traceExporter TraceExporter) (*trace.TracerProvider, error)

func TracerStart

func TracerStart(ctx context.Context, name string) (context.Context, tr.Span)

TracerStart 快速的开启一次trace记录

Types

type TraceExporter

type TraceExporter func(ctx context.Context) (trace.SpanExporter, error)

TraceExporter 创建trace导出对象的方法类型

func ExportGRPC

func ExportGRPC(endpoint string) TraceExporter

ExportGRPC 使用GRPC方式导出上报数据

func ExportHTTP

func ExportHTTP(endpoint string, usehttps bool) TraceExporter

ExportHTTP 使用HTTP方式 导出上报数据

func ExportStdout

func ExportStdout(pretty bool) TraceExporter

ExportStdout 输出到控制台 仅限测试用 勿使用再生产环境

Jump to

Keyboard shortcuts

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