Parent: #234
Scope
Add Sentry Rust SDK as dependency in both Rungu and CIRA workspaces, with configuration fields for DSN, environment, release, and tracing flags.
Applies To
- Rungu:
codecoradev/rungu — workspace crate rungud (binary)
- CIRA:
codecoradev/cira — workspace, main binary crate (TBD exact crate name)
Both share identical pattern: Rust/Axum backend, tracing + tracing-subscriber.
Cargo.toml Changes
[dependencies]
sentry = { version = "0.35", default-features = false, features = [
"backtrace",
"contexts",
"panic",
"tower",
"tower-axum",
"tower-http",
"tracing",
] }
sentry-tracing = "0.35"
Features breakdown:
| Feature |
Purpose |
backtrace |
Rust panic stack traces |
contexts |
OS, device, app context in events |
panic |
Auto-capture panic!() and unwrap failures |
tower |
Tower service middleware |
tower-axum |
Axum-specific tower layer |
tower-http |
HTTP request/response context |
tracing |
Bridge tracing spans to Sentry events |
NOT included (intentionally):
reqwest — no outbound HTTP from SDK needed (using custom transport or built-in)
ureq — same reason
curl — same reason
- Default transport uses
reqwest internally — this is fine, SDK ships with it
Config Changes
Add to config struct (both projects):
pub struct SentryConfig {
pub dsn: Option<String>, // None = disabled (dev mode)
pub environment: String, // "production" | "development"
pub release: String, // "rungu@0.2.0" or "cira@0.1.0"
pub traces_sample_rate: f64, // 0.0 = disabled (Phase 1 default)
#[serde(default)]
pub attach_stacktrace: bool, // true — always attach stacktrace
#[serde(default)]
pub send_default_pii: bool, // false — no PII by default
}
Environment variable mapping:
| Env Var |
Config Field |
Default |
SENTRY_DSN |
dsn |
None (disabled) |
SENTRY_ENVIRONMENT |
environment |
"development" |
SENTRY_RELEASE |
release |
from CARGO_PKG_VERSION |
SENTRY_TRACES_SAMPLE_RATE |
traces_sample_rate |
0.0 |
Tasks
Notes
- DSN format for TrapFall:
https://key@trapfall-host:9090/{project_id}
- In development,
SENTRY_DSN should be unset or empty → SDK disabled
- Release string format:
appname@version (Sentry convention)
Effort: ~1 hour
Parent: #234
Scope
Add Sentry Rust SDK as dependency in both Rungu and CIRA workspaces, with configuration fields for DSN, environment, release, and tracing flags.
Applies To
codecoradev/rungu— workspace craterungud(binary)codecoradev/cira— workspace, main binary crate (TBD exact crate name)Both share identical pattern: Rust/Axum backend,
tracing+tracing-subscriber.Cargo.toml Changes
Features breakdown:
backtracecontextspanictowertower-axumtower-httptracingNOT included (intentionally):
reqwest— no outbound HTTP from SDK needed (using custom transport or built-in)ureq— same reasoncurl— same reasonreqwestinternally — this is fine, SDK ships with itConfig Changes
Add to config struct (both projects):
Environment variable mapping:
SENTRY_DSNdsnSENTRY_ENVIRONMENTenvironment"development"SENTRY_RELEASEreleaseCARGO_PKG_VERSIONSENTRY_TRACES_SAMPLE_RATEtraces_sample_rate0.0Tasks
sentry+sentry-tracingtorungud/Cargo.tomlsentry+sentry-tracingto CIRA main crateCargo.tomlSentryConfigstruct to Runguconfig.rsSentryConfigstruct to CIRA config modulecargo checkpasses with new depsSENTRY_DSN=""→ SDK is not initialized (disabled)Notes
https://key@trapfall-host:9090/{project_id}SENTRY_DSNshould be unset or empty → SDK disabledappname@version(Sentry convention)Effort: ~1 hour