About
Centralized event logging system for Tana blockchain platform

Tags
No tags available

Languages
TypeScript 58%, Rust 28%, CSS 7%, Shell 4%, Dockerfile 1%, JavaScript 1%, HTML 1%

tana-event-bus

centralized event logging system for the Tana blockchain platform.

overview

tana-event-bus provides a unified event streaming infrastructure that all Tana services use to emit structured events. events flow through Redis streams and can be consumed by monitoring tools, notification services, and analytics pipelines.

how it works

services import a client library and call a dispatch function to emit events. the event bus server receives these events via HTTP and writes them to Redis streams organized by service, level, and category.

event flow

Tana services
     |
     v
event-bus clients (TypeScript or Rust)
     |
     v
event-bus server (Rust + Actix-web)
     |
     v
Redis streams
     |
     +---> events:all
     +---> events:service:{name}
     +---> events:level:{level}
     +---> events:category:{category}

event format

events follow a standardized schema:

{
  "timestamp": 1732464000000,
  "service": "ledger",
  "level": "info",
  "category": "block_production",
  "message": "block finalized",
  "metadata": {
    "height": 123,
    "txCount": 5
  }
}

architecture

the event bus has three components:

  1. server - Rust service using Actix-web that receives events and writes to Redis
  2. TypeScript client - npm package for Node.js/Bun services
  3. Rust client - crate for Rust services like tana-edge and tana-runtime

all three components share type definitions to ensure consistency across the ecosystem.

why centralized

a single event bus provides:

  • consistent event format across all services
  • easy filtering by service, level, or category
  • decoupled logging infrastructure
  • single point for monitoring integration

integration

services import the appropriate client and call dispatch with event data. the client handles serialization and HTTP transport. consumers subscribe to Redis streams filtered by their needs.