Skip to content
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

feat(kernel): Add message IDs to make it easier to trace messages #34

Merged
merged 5 commits into from Jul 25, 2022

Conversation

jamesmunns
Copy link
Contributor

This adds a number of u32 ID fields to each message in order to make tracing interactions between services easier.

u32 might be too much (I suspect u16 is probably enough, at least for service/client IDs), but I think this is a fine place to start. Most of the metadata insertion is "hidden" from end-consumers, happening in the built-in client and service handles, which means it should be hard to get wrong or forget to do.

@jamesmunns jamesmunns requested a review from hawkw July 25, 2022 15:39
@netlify
Copy link

netlify bot commented Jul 25, 2022

Deploy Preview for merry-scone-cc7a60 ready!

Name Link
🔨 Latest commit 83ab628
🔍 Latest deploy log https://app.netlify.com/sites/merry-scone-cc7a60/deploys/62df15d76adc190009895a28
😎 Deploy Preview https://deploy-preview-34--merry-scone-cc7a60.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, commented on a few minor suggestions

source/kernel/src/registry/mod.rs Outdated Show resolved Hide resolved
source/kernel/src/registry/mod.rs Show resolved Hide resolved
source/kernel/src/registry/mod.rs Outdated Show resolved Hide resolved
.map_err(|_| RegistrationError::RegistryFull)
.map_err(|_| RegistrationError::RegistryFull)?;
info!(uuid = ?RD::UUID, service_id = self.counter, "Registered");
self.counter = self.counter.wrapping_add(1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder if we should maybe log something in the event that this wraps, just so that a reader of the logs will know that they may see the same IDs repeat

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kicking this can down the road.

source/kernel/src/registry/mod.rs Show resolved Hide resolved
@jamesmunns jamesmunns merged commit 5402413 into main Jul 25, 2022
@jamesmunns jamesmunns deleted the james/message-metadata branch July 25, 2022 22:26
@jamesmunns jamesmunns added the area: kernel Related to the cross-platform kernel label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: kernel Related to the cross-platform kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants