-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow more verbose logging in release binaries #1365
Comments
Ugh, so this is not as simple as just changing the Instead, we'll need to create the |
As I understand it, this makes it a problem to enable DTrace at any more fine-grained level than what's been configured. But I assume that the slog feature would be enough for us to enable trace-level debugging in the config file. |
I think that's true, it just unfortunately means you can't have a distinction between the level of log messages sent to say stdout and to DTrace. I don't know how big of a deal that'll be in practice. I'm also not sure I understand why we're not getting messages. I wrote a test that was supposed to verify exactly this behavior, getting messages in the DTrace probes that are filtered out by one of the other drains. It's possible that Dropshot's use of |
I wonder if we could turn this on its head a bit. Today we use, say, the What if, instead, we had Of course, that requires source-level changes to use our magic slog wrapper, but I suspect that may be OK for our purposes; we'd at least be able to hit all of Omicron, Propolis, Crucible, any Dropshot server, any clients built by Progenitor, etc. |
I'm reasonably sure that Cargo features are biting us again here. But Omicron has dependencies which also use the feature flags to control the maximum release logging level, such as Dropshot, and those request the I tested this, by using a local patched copy of So what do we do about this? Josh's suggestion is one approach, which effectively bypasses Another option would be to ensure that all of our dependencies use One more option would be to submit a patch to |
That's wild. It'd be worth checking if that's intended. I could see going either way, but either way, this seems to violates Cargo's expectations here. Assuming this doesn't change:
I'd propose that any crates used as dependencies not specify any slog max_level features at all, which allows the top-level target to decide what it wants. This would be a problem if a crate was both used as a dependency and gets built independently for its binaries [and we want those binaries to have debug- or trace-level logging]. If we have anything like that today I wonder if we should separate them anyway.
There are two things here. First is building something to support Then there's the earlier problem where you might want the log file level to be Sorry if this is a silly question, but can we have dropshot's |
@davepacheco Still reading everything else, but on the last question, that's basically what we already have. Dropshot calls |
I like this. It's at least good that there's no default feature enabled in
I agree, this should mostly be handled by Dropshot's logging configuration. I only meant in the case where we don't use that path, we'll need to remember this. |
That makes sense, and that's great. Then I'm not sure what this meant earlier:
|
I was trying to root-cause it, and I was just wrong :) I thought the issue was putting something that filters messages at the root. That's not it, the problem is the feature unification done by Cargo. |
Added a new package, crucible-dtrace that pulls from buildomat a package that contains a set of DTrace scripts. These scripts are extracted into the global zone at /opt/oxide/crucible_dtrace/ Update Crucible to latest includes these updates: Clean up dependency checking, fixing space leak (#1372) Make a DTrace package (#1367) Use a single context in all messages (#1363) Remove `DownstairsWork`, because it's redundant (#1371) Remove `WorkState`, because it's implicit (#1370) Do work immediately upon receipt of a job, if possible (#1366) Move 'do work for one job' into a helper function (#1365) Remove `DownstairsWork` from map when handling it (#1361) Using `block_in_place` for IO operations (#1357) update omicron deps; use re-exported dropshot types in oximeter-producer configuration (#1369) Parameterize more tests (#1364) Misc cleanup, remove sqlite references. (#1360) Fix `Extent::close` docstring (#1359) Make many `Region` functions synchronous (#1356) Remove `Workstate::Done` (unused) (#1355) Return a sorted `VecDeque` directly (#1354) Combine `proc_frame` and `do_work_for` (#1351) Move `do_work_for` and `do_work` into `ActiveConnection` (#1350) Support arbitrary Volumes during replace compare (#1349) Remove the SQLite backend (#1352) Add a custom timeout for buildomat tests (#1344) Move `proc_frame` into `ActiveConnection` (#1348) Remove `UpstairsConnection` from `DownstairsWork` (#1341) Move Work into ConnectionState (#1340) Make `ConnectionState` an enum type (#1339) Parameterize `test_repair.sh` directories (#1345) Remove `Arc<Mutex<Downstairs>>` (#1338) Send message to Downstairs directly (#1336) Consolidate `on_disconnected` and `remove_connection` (#1333) Move disconnect logic to the Downstairs (#1332) Remove invalid DTrace probes. (#1335) Fix outdated comments (#1331) Use message passing when a new connection starts (#1330) Move cancellation into Downstairs, using a token to kill IO tasks (#1329) Make the Downstairs own per-connection state (#1328) Move remaining local state into a `struct ConnectionState` (#1327) Consolidate negotiation + IO operations into one loop (#1322) Allow replacement of a target in a read_only_parent (#1281) Do all IO through IO tasks (#1321) Make `reqwest_client` only present if it's used (#1326) Move negotiation into Downstairs as well (#1320) Update Rust crate clap to v4.5.4 (#1301) Reuse a reqwest client when creating Nexus clients (#1317) Reuse a reqwest client when creating repair client (#1324) Add % to keep buildomat happy (#1323) Downstairs task cleanup (#1313) Update crutest replace test, and mismatch printing. (#1314) Added more DTrace scripts. (#1309) Update Rust crate async-trait to 0.1.80 (#1298)
Update Crucible and Propolis to the latest Added a new package, crucible-dtrace that pulls from buildomat a package that contains a set of DTrace scripts. These scripts are extracted into the global zone at /opt/oxide/crucible_dtrace/ Crucible latest includes these updates: Clean up dependency checking, fixing space leak (#1372) Make a DTrace package (#1367) Use a single context in all messages (#1363) Remove `DownstairsWork`, because it's redundant (#1371) Remove `WorkState`, because it's implicit (#1370) Do work immediately upon receipt of a job, if possible (#1366) Move 'do work for one job' into a helper function (#1365) Remove `DownstairsWork` from map when handling it (#1361) Using `block_in_place` for IO operations (#1357) update omicron deps; use re-exported dropshot types in oximeter-producer configuration (#1369) Parameterize more tests (#1364) Misc cleanup, remove sqlite references. (#1360) Fix `Extent::close` docstring (#1359) Make many `Region` functions synchronous (#1356) Remove `Workstate::Done` (unused) (#1355) Return a sorted `VecDeque` directly (#1354) Combine `proc_frame` and `do_work_for` (#1351) Move `do_work_for` and `do_work` into `ActiveConnection` (#1350) Support arbitrary Volumes during replace compare (#1349) Remove the SQLite backend (#1352) Add a custom timeout for buildomat tests (#1344) Move `proc_frame` into `ActiveConnection` (#1348) Remove `UpstairsConnection` from `DownstairsWork` (#1341) Move Work into ConnectionState (#1340) Make `ConnectionState` an enum type (#1339) Parameterize `test_repair.sh` directories (#1345) Remove `Arc<Mutex<Downstairs>>` (#1338) Send message to Downstairs directly (#1336) Consolidate `on_disconnected` and `remove_connection` (#1333) Move disconnect logic to the Downstairs (#1332) Remove invalid DTrace probes. (#1335) Fix outdated comments (#1331) Use message passing when a new connection starts (#1330) Move cancellation into Downstairs, using a token to kill IO tasks (#1329) Make the Downstairs own per-connection state (#1328) Move remaining local state into a `struct ConnectionState` (#1327) Consolidate negotiation + IO operations into one loop (#1322) Allow replacement of a target in a read_only_parent (#1281) Do all IO through IO tasks (#1321) Make `reqwest_client` only present if it's used (#1326) Move negotiation into Downstairs as well (#1320) Update Rust crate clap to v4.5.4 (#1301) Reuse a reqwest client when creating Nexus clients (#1317) Reuse a reqwest client when creating repair client (#1324) Add % to keep buildomat happy (#1323) Downstairs task cleanup (#1313) Update crutest replace test, and mismatch printing. (#1314) Added more DTrace scripts. (#1309) Update Rust crate async-trait to 0.1.80 (#1298) Propolis just has this one update: Allow boot order config in propolis-standalone --------- Co-authored-by: Alan Hanson <alan@oxide.computer>
This came up during the demo dry-run today. We had an issue whose resolution might have been helped by inspecting trace-level log messages, which we can get via
slog-dtrace
. However, most (all?) of our crates actually filter out anything above debug at compile time, using thisslog
feature. We should probably allow more verbose logging in release mode, at least until we have specific reason to remove them.The text was updated successfully, but these errors were encountered: