# README

SDK Trace

PkgGoDev

# Packages

Package tracetest is a testing helper package for the SDK.

# Functions

AlwaysSample returns a Sampler that samples every trace.
NeverSample returns a Sampler that samples no traces.
NewBatchSpanProcessor creates a new SpanProcessor that will send completed span batches to the exporter with the supplied options.
NewSimpleSpanProcessor returns a new SpanProcessor that will synchronously send completed spans to the exporter immediately.
NewSpanLimits returns a SpanLimits with all limits set to the value their corresponding environment variable holds, or the default if unset.
NewTracerProvider returns a new and configured TracerProvider.
ParentBased returns a sampler decorator which behaves differently, based on the parent of the span.
TraceIDRatioBased samples a given fraction of traces.
WithBatcher registers the exporter with the TracerProvider using a BatchSpanProcessor configured with the passed opts.
WithBatchTimeout returns a BatchSpanProcessorOption that configures the maximum delay allowed for a BatchSpanProcessor before it will export any held span (whether the queue is full or not).
WithBlocking returns a BatchSpanProcessorOption that configures a BatchSpanProcessor to wait for enqueue operations to succeed instead of dropping data when the queue is full.
WithExportTimeout returns a BatchSpanProcessorOption that configures the amount of time a BatchSpanProcessor waits for an exporter to export before abandoning the export.
WithIDGenerator returns a TracerProviderOption that will configure the IDGenerator g as a TracerProvider's IDGenerator.
WithLocalParentNotSampled sets the sampler for the case of local parent which is not sampled.
WithLocalParentSampled sets the sampler for the case of sampled local parent.
WithMaxExportBatchSize returns a BatchSpanProcessorOption that configures the maximum export batch size allowed for a BatchSpanProcessor.
WithMaxQueueSize returns a BatchSpanProcessorOption that configures the maximum queue size allowed for a BatchSpanProcessor.
WithRawSpanLimits returns a TracerProviderOption that configures a TracerProvider to use these limits.
WithRemoteParentNotSampled sets the sampler for the case of remote parent which is not sampled.
WithRemoteParentSampled sets the sampler for the case of sampled remote parent.
WithResource returns a TracerProviderOption that will configure the Resource r as a TracerProvider's Resource.
WithSampler returns a TracerProviderOption that will configure the Sampler s as a TracerProvider's Sampler.
WithSpanLimits returns a TracerProviderOption that configures a TracerProvider to use the SpanLimits sl.
WithSpanProcessor registers the SpanProcessor with a TracerProvider.
WithSyncer registers the exporter with the TracerProvider using a SimpleSpanProcessor.

# Constants

DefaultAttributeCountLimit is the default maximum number of attributes a span can have.
DefaultAttributePerEventCountLimit is the default maximum number of attributes a span event can have.
DefaultAttributePerLinkCountLimit is the default maximum number of attributes a span link can have.
DefaultAttributeValueLengthLimit is the default maximum allowed attribute value length, unlimited.
DefaultEventCountLimit is the default maximum number of events a span can have.
Defaults for BatchSpanProcessorOptions.
DefaultLinkCountLimit is the default maximum number of links a span can have.
Defaults for BatchSpanProcessorOptions.
Defaults for BatchSpanProcessorOptions.
Defaults for BatchSpanProcessorOptions.
Drop will not record the span and all attributes/events will be dropped.
RecordAndSample indicates the span's IsRecording method returns true and trace.FlagsSampled flag must be set.
RecordOnly indicates the span's IsRecording method returns true, but trace.FlagsSampled flag must not be set.

# Structs

BatchSpanProcessorOptions is configuration settings for a BatchSpanProcessor.
Event is a thing that happened during a Span's lifetime.
Link is the relationship between two Spans.
SamplingParameters contains the values passed to a Sampler.
SamplingResult conveys a SamplingDecision, set of Attributes and a Tracestate.
SpanLimits represents the limits of a span.
Status is the classified state of a Span.
TracerProvider is an OpenTelemetry TracerProvider.

# Interfaces

IDGenerator allows custom generators for TraceID and SpanID.
ParentBasedSamplerOption configures the sampler for a particular sampling case.
ReadOnlySpan allows reading information from the data structure underlying a trace.Span.
ReadWriteSpan exposes the same methods as trace.Span and in addition allows reading information from the underlying data structure.
Sampler decides whether a trace should be sampled and exported.
SpanExporter handles the delivery of spans to external receivers.
SpanProcessor is a processing pipeline for spans in the trace signal.
TracerProviderOption configures a TracerProvider.

# Type aliases

BatchSpanProcessorOption configures a BatchSpanProcessor.
SamplingDecision indicates whether a span is dropped, recorded and/or sampled.