Event collection substrate for capturing, transporting, storing, and querying application events
| Tier | foundation |
| Role | unclassified (baselined) |
| Path | crates/foundation/telemetry |
| Edition | 2021 |
| Targets | foundation_telemetry |
| Public items | 20 across 8 modules |
| Tests | 9 |
What it is for
This crate does not document itself. No //! block on its entry point. The facts below are complete; the reason this crate exists is not written down anywhere, and belongs in src/lib.rs rather than here.
Capabilities
ErrorCaptureConfig
_No module-level documentation is present in the source._
| Item |
|---|
pub struct ErrorCaptureConfig |
FormCaptureConfig
_No module-level documentation is present in the source._
| Item |
|---|
pub struct FormCaptureConfig |
PageCaptureConfig
_No module-level documentation is present in the source._
| Item |
|---|
pub struct PageCaptureConfig |
TelemetryConfig
_No module-level documentation is present in the source._
| Item |
|---|
pub struct TelemetryConfig |
TelemetryConfig :: fn default() -> Self |
UiCaptureConfig
_No module-level documentation is present in the source._
| Item |
|---|
pub struct UiCaptureConfig |
Event
_No module-level documentation is present in the source._
| Item |
|---|
pub struct Event |
Event :: fn identity_linked(tenant_id : Uuid, device_id : Uuid, session_id : Uuid, actor_id : Uuid, anonymous_id : Option <String>, link_type : & str,) -> Self |
Event :: fn validate(& self) -> Result <(), ValidationError> |
GeoLocation
_No module-level documentation is present in the source._
| Item |
|---|
pub struct GeoLocation |
Source
_No module-level documentation is present in the source._
| Item |
|---|
pub enum Source |
Source :: fn as_str(& self) -> & 'static str |
ValidationError
_No module-level documentation is present in the source._
| Item |
|---|
pub enum ValidationError |
Viewport
_No module-level documentation is present in the source._
| Item |
|---|
pub struct Viewport |
IdentityConfig
_No module-level documentation is present in the source._
| Item |
|---|
pub enum IdentityConfig |
IdentityConfig :: fn default() -> Self |
DefaultPolicy
_No module-level documentation is present in the source._
| Item |
|---|
pub struct DefaultPolicy |
DefaultPolicy :: fn filter(& self, event : Event) -> Option <Event> |
DefaultPolicy :: fn retention(& self, _event : & Event) -> Option <Duration> |
EventPolicy
_No module-level documentation is present in the source._
| Item |
|---|
pub trait EventPolicy |
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
foundation_telemetry
configeventidentitypolicyqueryquery::filtersstoragestorage::memory
flowchart TD n_foundation_telemetry["foundation_telemetry"] n_foundation_telemetry --> n_config["config"] n_foundation_telemetry --> n_event["event"] n_foundation_telemetry --> n_identity["identity"] n_foundation_telemetry --> n_policy["policy"] n_foundation_telemetry --> n_query["query"] n_query --> n_query__filters["filters"] n_foundation_telemetry --> n_storage["storage"] n_storage --> n_storage__memory["memory"]
Public surface
`config`
| Item | What it is |
|---|---|
pub struct TelemetryConfig | — |
TelemetryConfig :: fn default() -> Self | — |
pub struct PageCaptureConfig | — |
pub struct FormCaptureConfig | — |
pub struct UiCaptureConfig | — |
pub struct ErrorCaptureConfig | — |
`event`
| Item | What it is |
|---|---|
pub enum Source | — |
Source :: fn as_str(& self) -> & 'static str | — |
pub struct Viewport | — |
pub struct GeoLocation | — |
pub struct Event | — |
Event :: fn identity_linked(tenant_id : Uuid, device_id : Uuid, session_id : Uuid, actor_id : Uuid, anonymous_id : Option <String>, link_type : & str,) -> Self | — |
Event :: fn validate(& self) -> Result <(), ValidationError> | — |
pub enum ValidationError | — |
`identity`
| Item | What it is |
|---|---|
pub enum IdentityConfig | — |
IdentityConfig :: fn default() -> Self | — |
`policy`
| Item | What it is |
|---|---|
pub trait EventPolicy | — |
pub struct DefaultPolicy | — |
DefaultPolicy :: fn filter(& self, event : Event) -> Option <Event> | — |
DefaultPolicy :: fn retention(& self, _event : & Event) -> Option <Duration> | — |
No pub use re-exports: every item above is declared in this crate.
Boundary
Depends on no other workspace tier.
Shares tier foundation with 27 other crates: foundation-audit-log, foundation-basemodels, foundation-bounded-io, foundation-conversation-closure, foundation-crypto-sign, foundation-decisioning, foundation-encounter-vocabulary, foundation-fs-metadata, … (27 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | foundation |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/foundation/telemetry |
| Vocabulary in force (lexicon) | current |
Dependencies
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
async-trait | ^0.1 | — | no | always |
chrono | ^0.4 | serde | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
thiserror | ^2 | — | no | always |
tokio | ^1 | full | no | always |
uuid | ^1 | v4, v7, serde, js | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tokio-test | ^0.4 | — | no | always |
Build. None.
Depended on by. 2 workspace crates.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_application_telemetry["application-telemetry"] -->|uses| SELF n_observability_sentinel["observability-sentinel"] -->|uses| SELF SELF["foundation-telemetry"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| lib | foundation_telemetry | `src/lib.rs` |
Error model
| Error type | Named by |
|---|---|
ValidationError | declared, no public signature returns it |
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | yes |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
2 workspace crates depend on this one: application-telemetry, observability-sentinel.
Verification
| Kind | Count |
|---|---|
| Unit tests | 9 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
config | 5 | 0 | 1 |
event | 5 | 0 | 0 |
identity | 1 | 0 | 0 |
policy | 2 | 0 | 0 |
What the tests establish, by name:
test_default_policy_accepts_all_events—src/lib.rstest_event_has_required_fields—src/lib.rstest_event_source_enum—src/lib.rstest_event_validation_required_fields—src/lib.rstest_form_capture_config_disabled_by_default—src/lib.rstest_identity_config_hybrid_mode—src/lib.rstest_identity_linking_event_shape—src/lib.rstest_page_capture_config_disabled_by_default—src/lib.rstest_telemetry_config_defaults_have_capture_modules_disabled—src/lib.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 0 | 20 |
Public modules with a //! block | 0 | 8 |
pie showData
title Public items with rustdoc
"Documented" : 0
"No rustdoc detected" : 20
Metrics
| Metric | Value |
|---|---|
| Rust source files | 9 |
| Source lines | 440 |
| Code lines | 390 |
| Public API items | 20 |
| Public modules | 8 |
| Tests | 9 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 7 |
| Workspace reverse dependencies | 2 |
pie showData
title Public API by kind
"enum" : 3
"method" : 7
"struct" : 9
"trait" : 1
pie showData
title Rust source composition
"Code" : 390
"Blank or comment" : 50
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.