xtracer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResource

func NewResource(ctx context.Context, cfg Config) (*sdkresource.Resource, error)

func Start

func Start(tracer trace.Tracer, ctx context.Context, span string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

Types

type Config

type Config struct {
	Tracer bool
	Metric bool
	Logs   bool

	ModuleName    string
	ServerName    string
	ServerAddress string

	GrpcHost string
	GrpcPort int
}

type GrpcClient

type GrpcClient struct{ *grpc.ClientConn }

func NewGrpcClient

func NewGrpcClient(cfg Config) (*GrpcClient, error)

type ShutdownFn

type ShutdownFn = func(context.Context) error

func NewOtelMeter

func NewOtelMeter(ctx context.Context, cfg Config, res *sdkresource.Resource, conn *grpc.ClientConn) (metric.Meter, ShutdownFn, error)

func NewOtelTracer

func NewOtelTracer(ctx context.Context, cfg Config, res *sdkresource.Resource, conn *grpc.ClientConn) (trace.Tracer, ShutdownFn, error)

Jump to

Keyboard shortcuts

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