otel

package module
v4.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 26 Imported by: 3

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPHandler added in v4.0.4

func HTTPHandler(next http.Handler, middleware httpMiddleware) http.Handler

func TemporalHandler added in v4.1.0

func TemporalHandler(interceptor temporalInterceptor) interceptor.WorkerInterceptor

Types

type Client

type Client string

type Config

type Config struct {
	// Resource describes an entity about which identifying information and metadata is exposed.
	Resource *Resource `mapstructure:"resource"`
	// Insecure endpoint (http)
	Insecure bool `mapstructure:"insecure"`
	// Compress - use gzip compression
	Compress bool `mapstructure:"compress"`
	// Exporter type, can be zipkin,stdout or otlp
	Exporter Exporter `mapstructure:"exporter"`
	// CustomURL to use to send spans, has effect only for the HTTP exporter
	CustomURL string `mapstructure:"custom_url"`
	// Client
	Client Client `mapstructure:"client"`
	// Endpoint to connect
	Endpoint string `mapstructure:"endpoint"`
	// ServiceName describes the service in the attributes
	ServiceName string `mapstructure:"service_name"`
	// ServiceVersion in semver format
	ServiceVersion string `mapstructure:"service_version"`
	// Headers for the otlp protocol
	Headers map[string]string `mapstructure:"headers"`
}

func (*Config) InitDefault

func (c *Config) InitDefault(log *zap.Logger)

type Configurer

type Configurer interface {
	// RRVersion returns running RR version
	RRVersion() string
	// UnmarshalKey takes a single key and unmarshal it into a Struct.
	UnmarshalKey(name string, out any) error
	// Has checks if config section exists.
	Has(name string) bool
}

type Exporter

type Exporter string

type Logger

type Logger interface {
	NamedLogger(name string) *zap.Logger
}

type Plugin

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

func (*Plugin) Init

func (p *Plugin) Init(cfg Configurer, log Logger) error

func (*Plugin) Middleware

func (p *Plugin) Middleware(next http.Handler) http.Handler

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) Serve

func (p *Plugin) Serve() chan error

func (*Plugin) Stop

func (p *Plugin) Stop(context.Context) error

func (*Plugin) Tracer added in v4.0.4

func (p *Plugin) Tracer() *sdktrace.TracerProvider

func (*Plugin) WorkerInterceptor added in v4.1.0

func (p *Plugin) WorkerInterceptor() interceptor.WorkerInterceptor

type Resource added in v4.3.0

type Resource struct {
	ServiceNameKey       string `mapstructure:"service_name"`
	ServiceNamespaceKey  string `mapstructure:"service_namespace"`
	ServiceInstanceIDKey string `mapstructure:"service_instance_id"`
	ServiceVersionKey    string `mapstructure:"service_version"`
}

Resource describes an entity about which identifying information and metadata is exposed. Resource is an immutable object, equivalent to a map from key to unique value

Jump to

Keyboard shortcuts

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