Documentation ¶
Index ¶
- Variables
- func NewBaggageSpanProcessor() trace.SpanProcessor
- func NewDynamicAttributeSpanProcessor(setAttributes func() []attribute.KeyValue) trace.SpanProcessor
- func NewSpanLinkExporter(apikey string, serviceName string) (*spanLinkExporter, error)
- func WithApiKey(apikey string) otelconfig.Option
- func WithDataset(dataset string) otelconfig.Option
- func WithDebugSpanExporter() otelconfig.Option
- func WithHoneycomb() otelconfig.Option
- func WithMetricsApiKey(apikey string) otelconfig.Option
- func WithMetricsDataset(dataset string) otelconfig.Option
- func WithSampler(sampleRate int) otelconfig.Option
- func WithTracesApiKey(apikey string) otelconfig.Option
- func WithTracesDataset(dataset string) otelconfig.Option
- type DeterministicSampler
Constants ¶
This section is empty.
Variables ¶
var (
Version string = "0.10.0"
)
Functions ¶
func NewBaggageSpanProcessor ¶
func NewBaggageSpanProcessor() trace.SpanProcessor
Returns a new baggageSpanProcessor.
The Baggage span processor duplicates onto a span the attributes found in Baggage in the parent context at the moment the span is started.
func NewDynamicAttributeSpanProcessor ¶
func NewDynamicAttributeSpanProcessor(setAttributes func() []attribute.KeyValue) trace.SpanProcessor
Returns a new dynamicAttributeSpanProcessor.
Use this span processor when you find yourself wishing for dynamic resource attributes.
Define a function that sets attributes and values for them, then pass that function in as the setAttributes parameter to this constructor. The Dynamic Attribute span processor will call setAttributes whenever a span is started which allows for defining a function once and to have attribute values determined on span start.
func NewSpanLinkExporter ¶ added in v0.2.0
func WithApiKey ¶
func WithApiKey(apikey string) otelconfig.Option
WithApiKey() sets the authorization header appropriately for sending to Honeycomb's API endpoint.
func WithDataset ¶
func WithDataset(dataset string) otelconfig.Option
WithDataset() sets the header for routing telemetry to a named dataset at Honeycomb. (For trace data in Classic teams and for metrics only.)
func WithDebugSpanExporter ¶
func WithDebugSpanExporter() otelconfig.Option
WithDebugSpanExporter() determines whether a debug (stdout) traces exporter should be configured.
func WithHoneycomb ¶
func WithHoneycomb() otelconfig.Option
WithHoneycomb() sets the destination for traces and metrics to Honeycomb's API endpoint.
func WithMetricsApiKey ¶ added in v0.2.0
func WithMetricsApiKey(apikey string) otelconfig.Option
WithMetricsApiKey() sets the authorization header appropriately for sending metrics telemetry to Honeycomb's API endpoint.
func WithMetricsDataset ¶ added in v0.2.0
func WithMetricsDataset(dataset string) otelconfig.Option
WithMetricsDataset() sets the header for routing metrics telemetry to a named dataset at Honeycomb.
func WithSampler ¶
func WithSampler(sampleRate int) otelconfig.Option
WithSampler() sets the sampler used to sample trace spans using a Honeycomb sample rate. Sample rate is expressed as 1/X where x is the population size.
func WithTracesApiKey ¶ added in v0.2.0
func WithTracesApiKey(apikey string) otelconfig.Option
WithTracesApiKey() sets the authorization header appropriately for sending traces telemetry to Honeycomb's API endpoint.
func WithTracesDataset ¶ added in v0.2.0
func WithTracesDataset(dataset string) otelconfig.Option
WithTracesDataset() sets the header for routing traces telemetry to a named dataset at Honeycomb.
Types ¶
type DeterministicSampler ¶
type DeterministicSampler struct {
// contains filtered or unexported fields
}
func NewDeterministicSampler ¶
func NewDeterministicSampler(sampleRate int) DeterministicSampler
func (DeterministicSampler) Description ¶
func (ds DeterministicSampler) Description() string
func (DeterministicSampler) ShouldSample ¶
func (ds DeterministicSampler) ShouldSample(parameters trace.SamplingParameters) trace.SamplingResult