Catalog PyPI
PACKAGE EXPLORERView in registry

agentbelt-sampler

PyPI

Agent-aware span sampling: keeps errors, cost/latency outliers, retries, and novel calls; samples the rest. Part of the agentbelt suite.

agentsllmobservabilityopentelemetrysamplingtracing
Versions collected1
Direct dependencies3From release 0.1.1
Last observed20 Oct, 21:32 UTC

README

Version 0.1.1 documentation

agentbelt-sampler

Agent-aware span sampling: always keep errors, cost/latency outliers, retries, and novel calls; sample everything else at a low rate. Part of the agentbelt suite.

pip install agentbelt-sampler
# or, for the real OpenTelemetry Sampler adapter:
pip install agentbelt-sampler[otel]

Quickstart

from agentbelt_sampler import Sampler, SamplingPolicy, Span

sampler = Sampler(SamplingPolicy(boring_sample_rate=0.05))

if sampler.should_keep(Span(tool="search", cost_usd=0.002, is_error=False)):
    export(span)

Run python examples/volume_demo.py for a concrete before/after number (errors and outliers 100% retained, overall volume cut substantially on a repetitive synthetic stream).

What did this actually catch?

print(sampler.impact_report())
# 100 span(s) seen, 11 kept (89.0% reduction)

The most direct of the three impact reports — seen vs. kept, mapped straight to observability-backend cost reduction.

See the suite README for the full concept and how this fits with agentbelt-budget and agentbelt-loop.

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.18 Sept 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
bsaptarshi/agentbelt

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:32 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:5fa02acc2059d7d0345ac67dfdc922e485784c71bea0e9ef400156a7d07bc601