opentelemetry

package module
v0.0.0-...-f8b82aa Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

README

CoreDNS OpenTelemtry Plugin

Documentation

Index

Constants

View Source
const PluginName string = "opentelemetry"

Variables

This section is empty.

Functions

This section is empty.

Types

type OtelConfig

type OtelConfig struct {
	Endpoint     string `cf:"endpoint" check:"nonempty"`
	ServiceName  string `cf:"servicename" default:"coredns"`
	Hostname     string `cf:"hostname"`
	BatchTimeout string `cf:"batchtimeout" check:"nonempty" default:"5s"`
	BatchSize    string `cf:"batchsize" check:"nonempty" default:"10"`
	SamplingRate string `cf:"samplingrate" check:"nonempty" default:"5"`
}

func ParseConfig

func ParseConfig(c *caddy.Controller) (*OtelConfig, error)

type OtelPlugin

type OtelPlugin struct {
	Next plugin.Handler
	Cfg  OtelConfig
}

func CreatePlugin

func CreatePlugin(c *caddy.Controller) (*OtelPlugin, error)

func (OtelPlugin) GetBatchSize

func (p OtelPlugin) GetBatchSize() int

func (OtelPlugin) GetBatchTimeout

func (p OtelPlugin) GetBatchTimeout() time.Duration

func (OtelPlugin) GetHostname

func (p OtelPlugin) GetHostname() string

func (OtelPlugin) GetSamplingRateFraction

func (p OtelPlugin) GetSamplingRateFraction() float64

func (OtelPlugin) Name

func (p OtelPlugin) Name() string

func (OtelPlugin) ServeDNS

func (p OtelPlugin) ServeDNS(ctx context.Context, writer dns.ResponseWriter, msg *dns.Msg) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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