compare

How hashspan compares

hashspan records an AI agent's on-chain transactions as OpenTelemetry spans inside the agent's own trace. The same goes for a TypeScript service that sends EVM transactions through viem, the Coinbase CDP SDK or x402, or through a wallet service. Other tools do different jobs, and many teams use several together. This page compares approaches, not products.

  • Yes
  • Varies, see the note
  • No
Capabilities of five approaches to observing an AI agent's on-chain transactions
CapabilityhashspanManual OTel spansRPC-level instrumentationContract / address monitoring platformsLLM / agent observability platforms
Lives inside the agent's traceYesYesVaries1NoVaries2
Transaction lifecycle (send → confirm)YesVaries3NoVaries4No
Real fee, incl. the L1 data feeYesVaries3NoVaries4No
Decoded revert reasonsYes5Varies3NoVaries4No
Replaced transactions handledYesVaries3NoVaries4No
Agent identity on transaction spansYesVaries3NoNoNo2
Uses your existing backend (no new dashboard)YesYesYesNoVaries6
Open sourceYesYesVaries4Varies4Varies4
Alerting and contract monitoringNo7NoNoYesNo
LLM prompt and eval tracingNo7Varies3NoNoYes
  1. RPC spans can nest under the active span, but they describe JSON-RPC calls, not the transaction outcome.
  2. They see the agent and the tool call. The transaction outcome stays outside the trace unless you add it yourself.
  3. Possible if you write and maintain the instrumentation yourself.
  4. Depends on the specific tool or platform.
  5. Best effort: the transaction is replayed with eth_call on the previous block, and once more on its own block when that replay does not revert. Error messages are opt-in.
  6. Usually their own backend and UI; many accept OpenTelemetry (OTLP) input.
  7. Not hashspan's job. Use it alongside a monitoring or LLM observability platform; your tracing backend can still alert on spans.

When to use what

Manual OTel spans

One custom flow, full control?

Write spans yourself when the flow is small and you own the maintenance.

RPC-level instrumentation

Is my node or RPC provider slow?

Latency and errors of individual JSON-RPC calls.

Monitoring platforms

Did anything touch this contract?

Alerts, security and simulation around contracts and addresses.

LLM / agent observability

Why did the agent do that?

Prompts, tool calls, evals and token cost.

hashspan

Did the agent's transaction land, and what did it cost?

The chain outcome inside the agent's own trace, in your existing backend.

With Pimlico's viem instrumentation

@pimlico/opentelemetry-instrumentation-viem patches viem's JSON-RPC client and records a span for each request, with the method and the RPC server. hashspan records the transaction: was it mined, what did it cost, why did it revert. They answer different questions, and they work together.

// tracing.cjs: load it before the agent, with node --require ./tracing.cjs agent.cjs
const { NodeTracerProvider, BatchSpanProcessor } = require('@opentelemetry/sdk-trace-node');
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-proto');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { ViemInstrumentation } = require('@pimlico/opentelemetry-instrumentation-viem');

new NodeTracerProvider({ spanProcessors: [new BatchSpanProcessor(new OTLPTraceExporter())] }).register();
// A span for each JSON-RPC request made inside a trace, such as the agent's tool calls.
registerInstrumentations({ instrumentations: [new ViemInstrumentation({ requireParentSpan: true })] });

// agent.cjs: hashspan on the clients, as usual.
const hashspan = withHashspan();
const wallet = createWalletClient({ account, chain, transport: http(rpcUrl) }).extend(hashspan);
const reader = createPublicClient({ chain, transport: http(rpcUrl) }).extend(hashspan);
  • execute_tool pay_vendoryour agent
  • send 31337hashspan
  • eth_fillTransactionPimlico
  • eth_sendRawTransactionPimlico
  • eth_getTransactionReceiptPimlico
  • confirm 31337 · linked to sendhashspan
  • eth_blockNumber, eth_getTransactionByHash, …Pimlico
One run on a local chain, as Jaeger showed it: the requests that sign and send nest under hashspan's send span, because it is the active span while the send runs.
  • Pick one source of JSON-RPC spans. hashspan's traceTransport() records them too; with both, every request is recorded twice.
  • Mind the URL. Pimlico's spans carry the full RPC URL (url.full), so a provider key in the URL ends up in your traces. traceTransport() records the method and the host, without the URL path, parameters or results.
  • Checked with @hashspan/viem 0.8.2, @pimlico/opentelemetry-instrumentation-viem 0.0.5-alpha.1 and viem 2.57.2, as CommonJS, on 2026-10-02 (UTC).

Use them together

A typical setup keeps each tool on its own job, joined by the trace and the transaction hash.

  1. Agent observabilityprompts, tool calls, evals
  2. hashspansend · confirm · fee · revert, in the same trace
  3. Monitoring platformalerts on contracts and addresses

Spotted something inaccurate? Open a discussion.

Type to search the docs, Learn topics and the blog.