Skip to main content

Why Sample

HoneyHive traces asynchronously and batches span exports, so overhead is minimal. At very high volumes, however, you may want to selectively trace to control cost and storage. The goal is to capture every trace that matters while reducing noise from routine traffic.

Strategies

Always Trace Errors

Failed requests are the most valuable traces. Always capture them regardless of sampling rate.

Always Trace High-Priority Requests

Premium users, flagged accounts, or specific endpoints should always be traced.

Percentage Sampling

For regular traffic, sample a fixed percentage:

Combined

In practice, combine these strategies:

Applying Sampling

Use your sampling function to conditionally initialize the tracer or skip tracing for a given request:

Payload Size

Independent of sampling, avoid tracing large objects directly. Trace metadata about the data instead:

Production Deployment

Initialization patterns for production environments

Tracing Introduction

Data model and architecture overview

Span Filtering

Drop noisy framework spans using prefix-based rules