opentelemetry

package
v0.0.0-...-9145d8a Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OTLPProtocol

type OTLPProtocol string
const (
	GRPC OTLPProtocol = "grpc"
	HTTP OTLPProtocol = "http/protobuf"
)

type OTelAdapter

type OTelAdapter struct {
	*observe.AdapterBase
	Config *OTelConfig
}

func NewOTelAdapter

func NewOTelAdapter(config *OTelConfig) *OTelAdapter

NewOTelAdapter will create an instance of an OTelAdapter using the configuration to construct an otlptrace.Client based on the Protocol set in the config.

func (*OTelAdapter) Flush

func (o *OTelAdapter) Flush(evts []observe.TraceEvent) error

func (*OTelAdapter) HandleTraceEvent

func (o *OTelAdapter) HandleTraceEvent(te observe.TraceEvent)

func (*OTelAdapter) Start

func (o *OTelAdapter) Start(ctx context.Context)

func (*OTelAdapter) Stop

func (o *OTelAdapter) Stop(wait bool)

func (*OTelAdapter) StopWithContext

func (o *OTelAdapter) StopWithContext(ctx context.Context, wait bool) error

func (*OTelAdapter) UseCustomClient

func (a *OTelAdapter) UseCustomClient(client otlptrace.Client)

UseCustomClient accepts a pre-initialized client to allow for customization of how to get data into a collector

type OTelConfig

type OTelConfig struct {
	ServiceName        string
	EmitTracesInterval time.Duration
	TraceBatchMax      uint32
	Endpoint           string
	Protocol           OTLPProtocol
	ClientHeaders      map[string]string
	AllowInsecure      bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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