Documentation ¶
Overview ¶
Package honeycomb implements o11y tracing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Host string Dataset string Key string Format string SendTraces bool // Should we actually send the traces to the honeycomb server? Sender transmission.Sender SampleTraces bool SampleKeyFunc func(map[string]interface{}) string SampleRates map[string]int Writer io.Writer Metrics o11y.ClosableMetricsProvider ServiceName string Debug bool }
type MultiSender ¶
type MultiSender struct {
Senders []transmission.Sender
}
func (*MultiSender) Add ¶
func (s *MultiSender) Add(ev *transmission.Event)
Add calls Add on every configured Sender
func (*MultiSender) Flush ¶
func (s *MultiSender) Flush() error
func (*MultiSender) SendResponse ¶
func (s *MultiSender) SendResponse(resp transmission.Response) bool
SendResponse calls SendResponse on every configured Sender
func (*MultiSender) Start ¶
func (s *MultiSender) Start() error
Start calls Start on every configured Sender, aborting on the first error
func (*MultiSender) Stop ¶
func (s *MultiSender) Stop() error
Stop calls Stop on every configured Sender. It will call Stop on every Sender even if there are errors
func (*MultiSender) TxResponses ¶
func (s *MultiSender) TxResponses() chan transmission.Response
TxResponses returns the response channel from the first Sender only
type TextSender ¶
TextSender implements the transmission.Sender interface by marshalling events to human-readable text and writing to the writer w, with optional colour
the implementation is heavily cribbed from honeycomb's transmission.WriterSender
func (*TextSender) Add ¶
func (t *TextSender) Add(ev *transmission.Event)
func (*TextSender) Flush ¶
func (t *TextSender) Flush() error
func (*TextSender) SendResponse ¶
func (t *TextSender) SendResponse(r transmission.Response) bool
func (*TextSender) Start ¶
func (t *TextSender) Start() error
func (*TextSender) Stop ¶
func (t *TextSender) Stop() error
func (*TextSender) TxResponses ¶
func (t *TextSender) TxResponses() chan transmission.Response
type TraceSampler ¶
type TraceSampler struct { // keyFunc takes the event's fields map and returns a single string key // which will be used as the lookup into the sampling strategy KeyFunc func(map[string]interface{}) string Sampler dynsampler.Sampler }
Click to show internal directories.
Click to hide internal directories.