jaegerKit

package
v2.1.24 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustSetup

func MustSetup(config *Config)

func NewTracerProvider

func NewTracerProvider(url string, rc *ResourceConfig) (*trace.TracerProvider, error)

NewTracerProvider

参考: https://github.com/open-telemetry/opentelemetry-go/blob/main/example/jaeger/main.go

tracerProvider returns an OpenTelemetry TracerProvider configured to use
the Jaeger exporter that will send spans to the provided url. The returned
TracerProvider will also use a Resource configured with all the information
about the application.

@param url e.g."http://localhost:14268/api/traces"

func Setup

func Setup(config *Config) error

Types

type Config

type Config struct {
	Access bool `json:"access"`
	// Url Jaeger服务的url,e.g."http://localhost:14268/api/traces"
	Url string `json:"url"`
}

type ResourceConfig

type ResourceConfig struct {
	// ServiceName 服务名
	ServiceName string `json:"serviceName"`
	// Environment 环境
	Environment string `json:"environment"`
	// ID id
	ID int64 `json:"id"`
}

Jump to

Keyboard shortcuts

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