Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
([#14280](https://github.com/mozilla/experimenter/pull/14280))
* Enable using `PreviousGeckoPrefState` to revert Gecko pref experiments when applicable ([#7157](https://github.com/mozilla/application-services/pull/7157))

### Error support
* Removed the `tracing-logging` and `tracing-reporting` features, these are now always enabled.
We don't believe this should affect any consumers, since they're were already using the
`tracing-logging` feature and were either also using `tracing-reporting` or not handling error
reporting at all.

## ✨ What's New ✨

### Ads Client
Expand Down
2 changes: 1 addition & 1 deletion components/fxa-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ url = "2.2"
viaduct = { path = "../viaduct" }
jwcrypto = { path = "../support/jwcrypto" }
rc_crypto = { path = "../support/rc_crypto", features = ["ece", "hawk"] }
error-support = { path = "../support/error", features = ["tracing-logging"] }
error-support = { path = "../support/error" }
thiserror = "2"
anyhow = "1.0"
sync-guid = { path = "../support/guid", features = ["random"] }
Expand Down
2 changes: 1 addition & 1 deletion components/relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
error-support = { path = "../support/error", features = ["tracing-logging"] }
error-support = { path = "../support/error" }
log = "0.4"
remote_settings = { path = "../remote_settings" }
serde = { version = "1", features=["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion components/remote_settings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ thiserror = "2"
serde = { version = "1", features=["derive"] }
serde_json = "1"
parking_lot = "0.12"
error-support = { path = "../support/error", features = ["tracing-logging"] }
error-support = { path = "../support/error" }
sql-support = { path = "../support/sql" }
viaduct = { path = "../viaduct" }
url = "2"
Expand Down
2 changes: 1 addition & 1 deletion components/suggest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ remote_settings = { path = "../remote_settings" }
rusqlite = { version = "0.37.0", features = ["functions", "bundled", "load_extension", "collation"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
error-support = { path = "../support/error", features = ["tracing-logging"] }
error-support = { path = "../support/error" }
sql-support = { path = "../support/sql" }
viaduct = { path = "../viaduct" }
tempfile = { version = "3.2.0", optional = true }
Expand Down
4 changes: 1 addition & 3 deletions components/support/error/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ lazy_static = { version = "1.4" }
log = { version = "0.4" }
parking_lot = { version = ">=0.11,<=0.12" }
tracing = { version = "0.1", optional = true }
tracing-support = { path = "../tracing", optional = true }
tracing-support = { path = "../tracing" }
uniffi = { version = "0.31" }

[build-dependencies]
uniffi = { version = "0.31", features=["build"]}

[features]
backtrace = ["dep:backtrace"]
tracing-logging = ["dep:tracing", "dep:tracing-support"]
tracing-reporting = ["dep:tracing", "dep:tracing-support"]
testing = []
34 changes: 1 addition & 33 deletions components/support/error/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

// kinda abusing features here, but features "override" builtin support.
#[cfg(not(feature = "tracing-logging"))]
pub use log::{debug, error, info, trace, warn, Level};

#[cfg(feature = "tracing-logging")]
pub use tracing_support::{debug, error, info, trace, warn, Level};

#[cfg(all(feature = "testing", not(feature = "tracing-logging")))]
pub fn init_for_tests() {
let _ = env_logger::try_init();
}

#[cfg(all(feature = "testing", not(feature = "tracing-logging")))]
pub fn init_for_tests_with_level(level: Level) {
// There's gotta be a better way :(
let level_name = match level {
Level::Debug => "debug",
Level::Trace => "trace",
Level::Info => "info",
Level::Warn => "warn",
Level::Error => "error",
};
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or(level_name)).init();
}

#[cfg(all(feature = "testing", feature = "tracing-logging"))]
#[cfg(feature = "testing")]
pub use tracing_support::{init_for_tests, init_for_tests_with_level};

mod macros;
Expand Down Expand Up @@ -67,17 +45,7 @@ pub mod backtrace {
mod redact;
pub use redact::*;

#[cfg(not(feature = "tracing-reporting"))]
mod reporting;
#[cfg(not(feature = "tracing-reporting"))]
pub use reporting::{
report_breadcrumb, report_error_to_app, set_application_error_reporter,
unset_application_error_reporter, ApplicationErrorReporter,
};

#[cfg(feature = "tracing-reporting")]
mod error_tracing;
#[cfg(feature = "tracing-reporting")]
pub use error_tracing::{report_breadcrumb, report_error_to_app};

pub use error_support_macros::handle_error;
Expand Down
77 changes: 0 additions & 77 deletions components/support/error/src/reporting.rs

This file was deleted.

2 changes: 1 addition & 1 deletion components/support/rust-log-forwarder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exclude = ["/android", "/ios"]

[dependencies]
uniffi = { version = "0.31" }
error-support = { path = "../error", default-features = false, features = ["tracing-logging"] }
error-support = { path = "../error", default-features = false }
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "std"] }
tracing-support = { path = "../tracing" }

Expand Down
2 changes: 1 addition & 1 deletion components/tabs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exclude = ["/android", "/ios"]

[dependencies]
anyhow = "1.0"
error-support = { path = "../support/error", features = [ "tracing-logging" ] }
error-support = { path = "../support/error" }
interrupt-support = { path = "../support/interrupt" }
payload-support = { path = "../support/payload" }
lazy_static = "1.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/nimbus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
nimbus-sdk = { path = "../../components/nimbus/", features = ["stateful"] }
serde_json = "1"
uuid = { version = "1.3", features = ["serde", "v4"]}
error-support = { path = "../../components/support/error", features = ["testing", "tracing-logging"] }
error-support = { path = "../../components/support/error", features = ["testing"] }
viaduct-hyper = { path = "../../components/support/viaduct-hyper" }
clap = { version = "4.2", default-features = false, features = ["std", "derive"] }
remote_settings = { path = "../../components/remote_settings" }
2 changes: 1 addition & 1 deletion megazords/full/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ viaduct = { path = "../../components/viaduct", features = ["ohttp"] }
nimbus-sdk = { path = "../../components/nimbus" }
autofill = { path = "../../components/autofill" }
crashtest = { path = "../../components/crashtest" }
error-support = { path = "../../components/support/error", features = ["tracing-reporting"] }
error-support = { path = "../../components/support/error" }
suggest = { path = "../../components/suggest" }
search = { path = "../../components/search" }
tracing-support = { path = "../../components/support/tracing" }
Expand Down