otelKit

package
v2.8.122 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceIdKey = "trace-id"

	SpanIdKey = "span-id"
)

Variables

View Source
var NewAddConfig func(opts []metric.AddOption) metric.AddConfig = metric.NewAddConfig

Functions

func NewJaegerTracerProvider

func NewJaegerTracerProvider(url, service, environment string, id int64) (*trace.TracerProvider, error)

NewJaegerTracerProvider

PS: (1) agent 默认端口: 6831 (2) collector 默认端口: 14268 (3) 创建 TracerProvider 成功的情况下(即第2个返回值为nil),建议调用 otel.SetTracerProvider().

@param url 连接的jaeger服务(agent || collector) e.g."http://localhost:14268/api/traces"

func NewRemoteContext added in v2.2.58

func NewRemoteContext(traceIdStr, spanIdStr string) (context.Context, error)

NewRemoteContext TODO:

@param traceIdStr 请求头中,"trace-id"对应的值 @param spanIdStr 请求头中,"span-id"对应的值

func ShutdownJaegerTracerProvider added in v2.2.57

func ShutdownJaegerTracerProvider(tp *trace.TracerProvider)

Types

This section is empty.

Jump to

Keyboard shortcuts

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