-
Notifications
You must be signed in to change notification settings - Fork 10
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: add ceramic_one_info metric #162
Conversation
fn default() -> Self { | ||
Self { | ||
service_name: env!("CARGO_PKG_NAME").to_string(), | ||
build: git_version::git_version!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a good or bad idea to have the binary hash itself and include the running bin hash in this info?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it, its not a hash of the binary, but a hash of the git commit. Makes it very clear which exact commit of the code is being run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get that this is the commit.
My question was whether we want to also hash the binary at startup and also publish the bin hash with this info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah I misread your comment. Let me try that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it working, turns out debug builds can be 1GB+ so I added logic to not hash for debug builds. Seems like a fair compromise as we likely only care about this for release builds.
This adds an Info metric to ceramic so that we have no basic build/version information about the process.
Review Note
This change moves the one/src/main.rs to one/src/lib.rs so that we can export the Info type as needed. This makes the PR diff hard to read. But there are two separate commits, one where a
git mv
is used and another where themain.rs
is added back in. This should mean reviewing the first commit only is what you really need to see.