AgentSkillsCN

crate-map

SignalDB Crate地图——展示工作区成员构成、common/writer/querier/router等Crate中的模块位置,以及关键根文件。适用于在代码库中快速导航、定位代码归属,或清晰界定模块边界时使用。

SKILL.md
--- frontmatter
name: crate-map
description: SignalDB crate map - workspace members, module locations within common/writer/querier/router crates, and key root files. Use when navigating the codebase, finding where code lives, or understanding module boundaries.
user-invocable: false

SignalDB Crate Map

Workspace Members

CratePathTypeDescription
commonsrc/common/LibraryShared everything: config, auth, WAL, Flight, catalog, schema, storage
acceptorsrc/acceptor/Binary + LibraryOTLP gRPC/HTTP ingestion endpoint
writersrc/writer/Binary + LibraryIceberg-based data persistence (the "Ingester")
routersrc/router/Binary + LibraryHTTP API gateway + Flight routing layer
queriersrc/querier/Binary + LibraryDataFusion query execution engine
tempo-apisrc/tempo-api/LibraryGrafana Tempo API types and protobuf definitions
signaldb-binsrc/signaldb-bin/BinaryMonolithic mode runner (all services in one process)
signaldb-apisrc/signaldb-api/LibraryOpenAPI-generated admin API types
signaldb-clisrc/signaldb-cli/BinaryCLI for tenant, API key, dataset management
signaldb-sdksrc/signaldb-sdk/LibraryGenerated SDK client
grafana-pluginsrc/grafana-plugin/PluginGrafana datasource (TypeScript frontend + Rust backend)
signal-producersrc/signal-producer/BinaryTest data generator (OTLP traces)
tests-integrationtests-integration/Test crateEnd-to-end integration tests
xtaskxtask/BinaryBuild automation tasks

The common Crate (most important)

This is the shared foundation. Key modules:

ModulePathPurpose
configsrc/common/src/config/mod.rsConfiguration structs, TOML parsing, env vars
authsrc/common/src/auth.rsAuthenticator, TenantContext, API key validation
catalogsrc/common/src/catalog.rsService catalog (PostgreSQL/SQLite)
catalog_managersrc/common/src/catalog_manager.rsCatalogManager singleton for Iceberg catalog
walsrc/common/src/wal/mod.rsWrite-Ahead Log implementation
flightsrc/common/src/flight/Flight schemas, conversions, transport
flight/schema.rssrc/common/src/flight/schema.rsArrow schema definitions for OTLP data
flight/transport.rssrc/common/src/flight/transport.rsInMemoryFlightTransport, connection pooling
icebergsrc/common/src/iceberg/Consolidated Iceberg integration
iceberg/mod.rsCatalog creation, object store builders
iceberg/schemas.rsSchema creation functions for traces/logs/metrics, partition specs
iceberg/names.rsNaming utilities: build_table_identifier, build_namespace, build_table_location
iceberg/table_manager.rsIcebergTableManager with catalog caching
schemasrc/common/src/schema/Schema definitions and parsing
schema/schema_parser.rsTOML schema parser with inheritance
storagesrc/common/src/storage.rsObject store creation from DSN
service_bootstrapsrc/common/src/service_bootstrap.rsService registration + heartbeat

The writer Crate

ModulePathPurpose
processor.rssrc/writer/src/processor.rsWalProcessor -- background WAL->Iceberg
schema_transform.rssrc/writer/src/schema_transform.rsFlight v1 -> Iceberg v2 transform
storage/iceberg.rssrc/writer/src/storage/iceberg.rsIcebergTableWriter -- table creation + writes
flight_iceberg.rssrc/writer/src/flight_iceberg.rsIcebergWriterFlightService

The querier Crate

ModulePathPurpose
flight.rssrc/querier/src/flight.rsQuerierFlightService, TenantCatalog
querysrc/querier/src/query/Query execution modules
query/table_ref.rssrc/querier/src/query/table_ref.rsSafe table reference with slug validation
query/trace.rssrc/querier/src/query/trace.rsTrace query handlers
query/error.rssrc/querier/src/query/error.rsQuery error types
query/promqlsrc/querier/src/query/promql/PromQL query support
servicessrc/querier/src/services/Service implementations

The router Crate

ModulePathPurpose
tempo.rssrc/router/src/tempo.rsTempo-compatible API handlers
admin.rssrc/router/src/admin.rsAdmin API for tenant/key/dataset CRUD
service_registry.rssrc/router/src/service_registry.rsCached service discovery

Key Root Files

FilePurpose
Cargo.tomlWorkspace definition + shared dependencies
schemas.tomlSignal type schema definitions (compiled into binary)
signaldb.dist.tomlExample configuration file
docker-compose.ymlDevelopment environment setup
DockerfileMulti-stage build for all services