feat: canister logs extensions - #252
Merged
Merged
Conversation
This was referenced May 13, 2026
marc0olo
added a commit
that referenced
this pull request
Jun 18, 2026
## Summary Bumps pinned source submodules and updates docs to match. Driven by the icp-cli v1.0.0 release. ### Submodule bumps - `icp-cli` v0.3.1 → **v1.0.0** (`.sources/VERSIONS` updated) - `icp-cli-recipes`, `icp-cli-templates`, `icskills` → latest `main` - `icp-js-sdk-docs` already at tip ### icp-cli v1.0.0 - `--set-controller` was removed; `settings.mdx` now uses `--remove-all-controllers` combined with `--add-controller`. ### Motoko recipe v5.0.0 The recipe now compiles via `mops build`, so the source file, Candid file, and compiler args move from the recipe `configuration:` block into `mops.toml`. Updated in `project-structure.mdx`, `candid.mdx`, `optimization.md`, and `ethereum.mdx`. The GC-options example now shows a real legacy-persistence alternative (`--legacy-persistence` + `--compacting-gc`) rather than the now-default `--incremental-gc`. ### Latest recipes - Rust recipe pins → **v3.3.0**; redundant `package` dropped where it equals the canister name (v3.3.0 defaults it), with an explanatory note kept in the getting-started page. - asset-canister `v2.2.1` and prebuilt `v2.0.0` already current. ### Mainnet domain → `icp.net` / `id.ai` The icp-cli mainnet **HTTP gateway** domain is now `icp.net` (was `icp0.io`). Browser/canister-access URLs, `raw.*` domains, the `custom-domains/v1/` API, live canister links, and the NNS app (`nns.ic0.app` → `nns.icp.net`) were updated across the docs (all verified resolving). The Internet Identity service link now points to its canonical `https://id.ai`. Deliberately left unchanged (these are not the gateway): - JS `HttpAgent` / agent API hosts — the **API** endpoint is `icp-api.io`/`icp0.io`, separate from the gateway. - The Internet Identity `icp0.io` ↔ `ic0.app` delegation-rewriting behavior. - The verifiable-credentials `iss` (issuer) claim — a protocol identifier that must match what II signs (already flagged for human verification). Reconciling the icskills to `icp.net` is tracked in dfinity/icskills#224. ### Other - Fixed a pre-existing broken link in `edge-infrastructure.md` (`http-gateway-spec.md` → `http-gateway-protocol-spec.md`) surfaced by validation, plus minor lint cleanup (em-dash, `mo:base` reference) in files touched here. ## Notes - `npm run build` and `scripts/validate.js` both pass (209 pages). - Changes were reviewed by a subagent against `.sources/` with no must-fix findings. -⚠️ Possible merge conflict with #252 (also edits `settings.mdx`, in a different section).
Emphasize that an unfiltered fetch_canister_logs read trims the oldest records (response ends with the newest record) while a filtered read trims the newest records (response starts with the oldest matching record). Bound the trimming by an unspecified max response size. Also drop the stale duplicate "Canister logs (query call)" section re-introduced by the merge from main, which carried a duplicate anchor and pre-filter semantics.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Values between 1 and 4095 (inclusive) are not allowed.
…act model definite_canister_settings in ic.did declares log_memory_limit, so the record produced by canister_status must provide it.
…stract model The record produced by canister_status omitted log_visibility, snapshot_visibility, and status_visibility although definite_canister_settings in ic.did declares all three.
# Conflicts: # docs/references/ic-interface-spec/abstract-behavior.md # docs/references/ic-interface-spec/management-canister.md
mraszyk
marked this pull request as ready for review
August 31, 2026 20:16
pierugo-dfinity
approved these changes
Sep 1, 2026
pierugo-dfinity
left a comment
There was a problem hiding this comment.
Claude seems to suggest that we should also update docs/references/management-canister.md
Contributor
Author
|
Feedback addressed:
Not addressed: the |
raymondk
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Canister logs extensions:
log_memory_limitbounding the memory used for canister logs: it must be either0or a number between
4096and2097152(2 MiB), inclusively, with the default value4096.The oldest canister logs are purged if the total memory used for canister logs exceeds this value.
The memory used by the store holding the canister logs is determined by this setting
(it does not depend on the canister logs actually stored) and counted in the canister's memory usage.
Hence, raising this setting might require reserving cycles. Changing this setting also resizes
the store holding the canister logs, which consumes cycles.
The setting is reset if the canister runs out of cycles.
canister_statusreturns the settinglog_memory_limitand the memory used by the store holdingthe canister logs in the new field
log_memory_store_sizeofmemory_metrics.fetch_canister_logscan also be called by canisters via replicated (update) calls.It still cannot be called by external users via replicated calls.
filterargument offetch_canister_logsrestricting the returned logs to a range oflog indices (
by_idx) or timestamps (by_timestamp_nanos).fetch_canister_logsis bounded by an implementation-definedconstant chosen so as not to exceed the maximum response size (instead of the previous bound of 4KiB).
If the selected logs do not all fit, an unfiltered read trims the oldest logs (so the response ends
with the newest log) and a filtered read trims the newest logs (so the response starts with the oldest
log satisfying the filter).