Why Filter Spans
When using third-party frameworks that emit their own OpenTelemetry spans (e.g., Google A2A, PydanticAI internals, LangChain sub-components), those spans can clutter your traces with low-level transport or framework details that aren’t useful for debugging your application. Thespan_name_filters parameter on HoneyHiveTracer.init() lets you control which spans are sent to HoneyHive. Filtered spans are dropped before any enrichment or export, so they have zero overhead.
For full parameter details, see the
span_name_filters parameter in the SDK reference.Exclude Filter
Drop spans whose name starts with a given prefix. All other spans are kept.a2a.client.transports (e.g., a2a.client.transports.jsonrpc.JsonRpcTransport.send_message) while keeping useful spans like agent run, chat gpt-4o-mini, etc.
Include Filter
Only keep spans whose name starts with one of the given prefixes. All other spans are dropped.pydantic-ai or chat, dropping everything else.
Combining Include and Exclude
When bothinclude and exclude are specified, a span must match at least one include prefix and not match any exclude prefix.
a2a.* spans except the noisy transport internals.
Filter Entry Format
Each filter entry is a dictionary with two keys:| Key | Type | Description |
|---|---|---|
type | Literal["prefix"] | The matching strategy. Must be "prefix". |
value | str | The string to match against the beginning of the span name. |
Common Filters
| Framework | Noisy span prefix | Description |
|---|---|---|
| Google A2A | a2a.client.transports | JSON-RPC transport internals |
Debugging
Whenverbose=True is set on HoneyHiveTracer.init(), filtered spans are logged at debug level so you can verify your filters are working as expected.

