interface-spec icon indicating copy to clipboard operation
interface-spec copied to clipboard

feat: [IC-272] canister logging

Open maksymar opened this issue 1 year ago • 7 comments

This PR introduces the API changes needed to support MVP for canister logging.

maksymar avatar Dec 14 '23 14:12 maksymar

Will ic00.canister_status return log visibility of the canister?

mraszyk avatar Jan 08 '24 19:01 mraszyk

I suppose that logs produced during install_code will also be recorded, right?

mraszyk avatar Jan 09 '24 06:01 mraszyk

I suppose that logs produced during install_code will also be recorded, right?

since this is an update call, then it's one of the requirements from the design doc:

Developers are able to log messages in:

  • Heartbeats
  • Timers
  • Pre/post upgrade and canister_init
  • Update calls
  • Queries if called in replicated mode

maksymar avatar Jan 15 '24 15:01 maksymar

hi all, the feature is going to be available on the next dfx release, I suppose we can move forward with merging this PR.

please take another look and LGTM!

maksymar avatar Mar 18 '24 13:03 maksymar

In the Interface Spec meeting, we suggested that we may want to mark this feature as experimental.

Dfinity-Bjoern avatar Mar 26 '24 14:03 Dfinity-Bjoern

Really looking forward to this feature!

Stefs-2142 avatar May 11 '24 08:05 Stefs-2142

Why are we ignoring many cases of HypervisorError here? I also wonder if a trap log message should describe what ApiType trapped (in particular, in light of RUN-957).

mraszyk avatar May 20 '24 19:05 mraszyk

Why are we ignoring many cases of HypervisorError here?

because by design doc we only log debug_prints and traps. all the other HypervisorError's are specific to wasm execution, eg. Wasm engine errors, message rejected, invalid wasm, etc.

maksymar avatar May 21 '24 08:05 maksymar

I also wonder if a trap log message should describe what ApiType trapped (in particular, in light of RUN-957).

we wanted to keep it simple at the beginning with just adding a [TRAP]: prefix. it can be extended later to the method/args/api_type etc.

maksymar avatar May 21 '24 08:05 maksymar