honeycomb

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Package honeycomb contains a trace exporter for Honeycomb

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	Timestamp time.Time `json:"timestamp"`
	Value     string    `json:"value"`
}

Annotation represents an annotation with a value and a timestamp.

type Exporter

type Exporter struct {
	Builder        *libhoney.Builder
	SampleFraction float64
	// Service Name identifies your application. While optional, setting this
	// field is extremely valuable when you instrument multiple services. If set
	// it will be added to all events as `service_name`
	ServiceName string
}

Exporter is an implementation of trace.Exporter that uploads a span to Honeycomb

func NewExporter

func NewExporter(writeKey, dataset string) *Exporter

NewExporter returns an implementation of trace.Exporter that uploads spans to Honeycomb

writeKey is your Honeycomb writeKey (also known as your API key) dataset is the name of your Honeycomb dataset to send trace events to

Don't have a Honeycomb account? Sign up at https://ui.honeycomb.io/signup

func (*Exporter) Close

func (e *Exporter) Close()

Close waits for all in-flight messages to be sent. You should call Close() before app termination.

func (*Exporter) ExportSpan

func (e *Exporter) ExportSpan(sd *trace.SpanData)

ExportSpan exports a span to Honeycomb

type Span

type Span struct {
	TraceID     string       `json:"trace.trace_id"`
	Name        string       `json:"name"`
	ID          string       `json:"trace.span_id"`
	ParentID    string       `json:"trace.parent_id,omitempty"`
	DurationMs  float64      `json:"duration_ms"`
	Timestamp   time.Time    `json:"timestamp,omitempty"`
	Annotations []Annotation `json:"annotations,omitempty"`
}

Span is the format of trace events that Honeycomb accepts

Jump to

Keyboard shortcuts

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