otel

package
v0.0.0-...-05d7cce Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCConn

func NewGRPCConn(ctx context.Context, hostAddr string) (*grpc.ClientConn, error)

func NewResource

func NewResource(ctx context.Context, serviceName ServiceName, keyValues ...attribute.KeyValue) (*resource.Resource, error)

func ShutdownAll

func ShutdownAll(ctx context.Context, canShutdownServices ...CanShutdown) error

func WithContext

func WithContext(ctx context.Context) func(o *OTELOption)

func WithGRPCConn

func WithGRPCConn(conn *grpc.ClientConn) func(o *OTELOption)

func WithResource

func WithResource(res *resource.Resource) func(o *OTELOption)

func WithStdout

func WithStdout() func(o *OTELOption)

Types

type CanShutdown

type CanShutdown interface {
	Shutdown(ctx context.Context) error
}

type OTELOption

type OTELOption struct {
	// contains filtered or unexported fields
}

func DefaultOption

func DefaultOption() *OTELOption

func (*OTELOption) Conn

func (o *OTELOption) Conn() *grpc.ClientConn

func (*OTELOption) Context

func (o *OTELOption) Context() context.Context

func (*OTELOption) Resource

func (o *OTELOption) Resource() *resource.Resource

func (*OTELOption) Stdout

func (o *OTELOption) Stdout() bool

func (*OTELOption) Validate

func (o *OTELOption) Validate() error

type OTELOptionFunc

type OTELOptionFunc func(o *OTELOption)

type ServiceName

type ServiceName interface {
	Name() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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