# Functions
BucketWithSpans returns a stats bucket populated with spans stats.
GeneratePayload generates a new payload.
GenerateSpan generates a random root span with all fields filled in.
GenerateTrace generates a valid trace using the given config.
GetTestSpan returns a Span with different fields set.
GetTestTraces returns a []Trace that is composed by ``traceN`` number of traces, each one composed by ``size`` number of spans.
NewMockEngine returns a MockEngine for tests.
NewTestBackoffTimer creates a new instance of a TestBackoffTimer.
RandomBucket returns a bucket made from n random spans, useful to run benchmarks and tests.
RandomSizedBytes creates a random byte slice with the specified size.
RandomSpan generates a wide-variety of spans, useful to test robustness & performance.
RandomSpanDuration generates a random span duration.
RandomSpanError generates a random span error code.
RandomSpanID generates a random span ID.
RandomSpanMeta generates some random span metadata.
RandomSpanMetrics generates some random span metrics.
RandomSpanName generates a random span name string.
RandomSpanParentID generates a random span parent ID.
RandomSpanResource generates a random span resource string.
RandomSpanService generates a random span service string.
RandomSpanStart generates a span start timestamp.
RandomSpanTraceID generates a random trace ID.
RandomSpanType generates a random span type.
RandomStringMap creates a random map with string keys and values.
RandomTrace generates a random trace with a depth from 1 to maxLevels of spans.
RandomWeightedSpan generates a random weighted span, useful for stats tests.
TestSpan returns a fix span with hardcoded info, useful for reproducible tests.
TestWeightedSpan returns a static test weighted span for reproductive stats tests.
WithFeatures sets the given list of comma-separated features as active and returns a function which resets the features to their previous state.
# Variables
YearNS is the number of nanoseconds in a year.
# Structs
CountSummary contains a summary of all Count method calls to a particular StatsClient for a particular key.
GaugeSummary contains a summary of all Gauge method calls to a particular StatsClient for a particular key.
MetricsArgs represents arguments to a StatsClient Gauge method call.
MockEngine mocks a sampler engine.
SpanConfig defines the configuration for generating spans.
TestBackoffTimer is a backoff timer that ticks on-demand.
TestStatsClient is a mocked StatsClient that records all calls and replies with configurable error return values.
TraceConfig specifies trace generating configuration.