spinframework / spinframework/spin

Document `spin_app::App.id` gurantees

Open
#2,852 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
6.5k
Forks
310
Avg merge
1d 20h
Merged PRs (30d)
24

Description

spin_app::App.id is used in the Spin codebase almost exclusively for logging. The only place where it somewhat matters what the id is is in the Redis trigger where it used for telemetry. I feel somewhat uncomfortable that the id is somewhat assumed to be unique to the application, but it's not documented anywhere. Perhaps we want to be clearer about what gurantees users of the id can be sure of, and what callers of spin_app::App::new should try to maintain.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading spin_app::App::new and the Redis trigger usage at crates/trigger-redis/src/lib.rs around lines 200-205. Determine what guarantees App.id provides and what callers should maintain, then document those guarantees and expectations in the appropriate project documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.