feat: add tracing integration behind tracing feature flag
Add optional structured logging via the tracing crate: - info-level spans on all optimize* methods (direction, n_trials/duration) - info events for trial completed, new best value, trial pruned - debug events for trial failed and parameter sampled - Zero overhead when the feature is disabled
This commit is contained in:
@@ -23,12 +23,14 @@ tokio = { version = "1", features = ["sync", "rt-multi-thread"], optional = true
|
||||
optimizer-derive = { version = "0.1.0", path = "optimizer-derive", optional = true }
|
||||
serde = { version = "1", features = ["derive"], optional = true }
|
||||
serde_json = { version = "1", optional = true }
|
||||
tracing = { version = "0.1", optional = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
async = ["dep:tokio"]
|
||||
derive = ["dep:optimizer-derive"]
|
||||
serde = ["dep:serde", "dep:serde_json"]
|
||||
tracing = ["dep:tracing"]
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time"] }
|
||||
|
||||
Reference in New Issue
Block a user