DarkCrow consumes Redfly’s telemetry topic, writes each event to Cassandra with a one-year TTL, and every replica updates its local Solr core from an index topic.
Ingestion
- Redfly validates each event and publishes it to
persistent://odssbc/redfly/telemetry, keyed by tenant id. - One DarkCrow replica receives it through the Shared subscription
darkcrow-storeand writes it to Cassandra. - That replica publishes to
persistent://odssbc/darkcrow/index. - Every replica consumes the index topic through its own Exclusive subscription,
darkcrow-index-<pod>, and updates its local Solr core.
Event schema
Each event carries event_id (UUIDv7), ts, app, app_version, tenant_id, user_hash (HMAC-SHA256 of the Redfly user id with a rotating per-tenant salt), session_hash, name, level, duration_ms and attrs (map<text,text>, at most 32 keys, 256 characters each).
Data layer
Keyspace darkcrow, using NetworkTopologyStrategy {<dc>: 3} and LOCAL_QUORUM. The CQL is written by hand.
| Table | Primary key | Notes |
|---|---|---|
events | ((tenant_id, day), ts, event_id) | app, app_version, user_hash, session_hash, name, level, duration_ms, attrs; 1-year TTL, TWCS in 1-day windows |
events_by_id | (event_id) | tenant_id, day and ts, same TTL |
No views are required; search goes through Solr.
Search
A single Solr core, telemetry, with these fields:
event_id(id),tenant_id(string, filter),app,app_version,name(string facets),level(string facet).ts(pdate),duration_ms(plong),user_hashandsession_hash(string).attrs_*(dynamic string fields) andtext(copyField of name and attrs values).
Retention: a FairFeather job runs a nightly delete by query ts:[* TO NOW-1YEAR].
Authentication and authorization
- The Shiro realm
RedflyTokenRealmverifies the Redfly PASETO and checks the SeaWave revocation deny-list, fed fromodssbc/redfly/revocations. telemetry:read: users with theoperatorrole see every tenant; users withtenant-adminsee only their own tenants.
REST interfaces
| Method | Path | Auth | Purpose |
|---|---|---|---|
| GET | /v1/search | telemetry:read | Full-text and faceted search: q, tenant, app, name, level, from, to, cursor |
| GET | /v1/telemetry/{id} | telemetry:read | Fetch one event |
| POST | /v1/telemetry | service mTLS | Internal ingest and replay only |
| POST | /v1/admin/reindex | operator | Rebuild the local Solr core from Cassandra |
| POST | /v1/admin/purge | service mTLS (FairFeather) | Run the retention purge |
Ports
| Port | Bind | Purpose |
|---|---|---|
| 8444 | pod IP | HTTPS REST API and health |
| 7000 | pod IP, TLS | Cassandra internode traffic |
| 9042 | 127.0.0.1 | CQL native (app → embedded Cassandra) |
| 2181 | 127.0.0.1 | SunLink ZooKeeper protocol (Curator) |
| 7480 | pod IP, mTLS | SunLink Raft ring between replicas |
| 6379 | 127.0.0.1 | SeaWave RESP (Spring Session, deny-list) |
| 7481 | pod IP, mTLS | SeaWave peer replication |
Key environment variables
| Variable | Purpose |
|---|---|
DARKCROW_CASSANDRA_DATA_DIR, _KEYSPACE, _DC, _SEEDS | Embedded Cassandra |
DARKCROW_SOLR_DATA_DIR | Embedded Solr index directory |
DARKCROW_SHIRO_CONFIG | Shiro configuration file path |
DARKCROW_SUNLINK_CLUSTER | SunLink peers |
DARKCROW_PULSAR_SERVICE_URL | Pulsar broker URL |
DARKCROW_REDFLY_KEYS_URL | Redfly /v1/auth/keys, for PASETO verification |