otelKit

package
v2.8.104 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TraceIdKey = "trace-id"

	SpanIdKey = "span-id"
)

Variables

This section is empty.

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