Soroban Core Metrics
Table Metadata​
| Property | Configuration |
|---|---|
| Natural Key(s) | transaction_hash, metric_key |
| Partition Field(s) | closed_at (DAY partition) |
| Clustered Field(s) | contract_id |
| Documentation | dbt docs |
Denormalized Soroban host-emitted core_metrics diagnostic events extracted from history_contract_events and joined to the root contract from each transaction's invoke_host_function operation. One row per (transaction_hash, metric_key).
The Soroban host emits 19 core_metrics events at the end of every transaction summarizing the resources consumed by the invocation: CPU instructions, memory bytes, ledger entries read/written, event emission, invocation time, and per-category read/write/key/code byte counters. These events live inside JSON columns (topics_decoded, data_decoded) on history_contract_events, which makes them expensive to query at scale — this mart exposes them as pre-extracted INT64 columns instead.
Includes both successful and failed Soroban transactions, since the host emits core_metrics regardless of outcome and fees are charged on failed invocations. Backfilled from 2024-02-20 (Soroban launch).
Column Details​
| Name | Description | Data Type | Domain Values | Required? | Notes |
|---|---|---|---|---|---|
| closed_at | Timestamp in UTC when the ledger that included this transaction was closed by the Stellar network. | TIMESTAMP | Yes | Partition Field. | |
| ledger_sequence | Sequence number of the ledger that included this transaction. | INTEGER | Yes | Allows ledger-grain analysis, e.g. aggregating metric_value per ledger to compute per-ledger resource utilization against the protocol's ledger-level limits. | |
| transaction_hash | Hex hash of the Soroban transaction that produced this metric. | STRING | Yes | Combined with metric_key, forms the table's unique grain (one row per metric per transaction). | |
| contract_id | The Soroban smart contract address (strkey C...) invoked at the root of this transaction's invoke_host_function operation. | STRING | No | Cluster Field. Reflects the contract the user's wallet directly called — not contracts called internally via cross-contract invocation. Null when the transaction has no invoke_host_function op with a populated root contract, i.e. invoke_host_function with sub-type upload_wasm, or transactions whose only Soroban ops are extend_footprint_ttl / restore_footprint. These rows are retained so per-metric COUNT(*) and SUM(metric_value) totals match the raw history_contract_events source row-for-row. | |
| metric_key | Symbol from topics_decoded[1].symbol on the host-emitted core_metrics diagnostic event. | STRING |
| Yes | One of 19 values the Soroban host emits per transaction. |
| metric_value | The u64 value of the corresponding metric_key, extracted from data_decoded.u64 and cast to INT64. | INTEGER | Yes | Always non-null and non-negative. Semantic interpretation depends on metric_key: a count for entry/event metrics, a byte total for byte metrics, a nanosecond duration for invoke_time_nsecs, or the protocol-level resource limit for max_* metrics. | |
| airflow_start_ts | Timestamp when the Airflow DAG run started. | STRING | No | Used for pipeline metadata and debugging. |