Add two initial metrics to the indexer - #1389
Open
dcookspi wants to merge 2 commits into
Open
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
jrray
reviewed
Jul 13, 2026
Comment on lines
+109
to
+115
| .unwrap_or_else(|_| String::from("spk.indexer_heartbeat_count")) | ||
| }); | ||
|
|
||
| // TODO: add the default value to a config file, once spk has one | ||
| pub static SPK_INDEXER_INDEX_UPDATE_METRIC: Lazy<String> = Lazy::new(|| { | ||
| std::env::var("SPK_INDEXER_INDEX_UPDATE_METRIC") | ||
| .unwrap_or_else(|_| String::from("spk.indexer_index_update_count")) |
Collaborator
There was a problem hiding this comment.
Instead of having hard-coded fallbacks, please make it so sending these count changes is disabled unless the metric names are found in the configuration.
Collaborator
Author
There was a problem hiding this comment.
- Remove the indexer metric names, change to not send indexer metrics unless the names are configured.
Collaborator
Author
There was a problem hiding this comment.
I've removed the default metrics names and moved them to the Indexer config section. The metrics won't be sent unless the metric names are configured. Getting the correct metric name to the point where the event messages are sent required adding the IndexUpdateContext helper struct.
jrray
requested changes
Jul 13, 2026
Moves metrics code to spk-config crate. Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
dcookspi
force-pushed
the
indexer-add-metrics
branch
from
July 13, 2026 17:44
ee32db5 to
bfda313
Compare
Moves indexer metric naming to spk config. Indexer metrics will only be sent if configured, and the heartbeat metric will be updated for all index update events. Adds IndexUpdateContext helper struct. Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
dcookspi
force-pushed
the
indexer-add-metrics
branch
from
July 14, 2026 23:56
af83bd4 to
208a9ef
Compare
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.
This adds some initial metrics to the indexer. It moves the metrics code to the
spk-configcrate to do this, and avoid creating a dependency cycle between the spk-solver and spk-storage crates.This adds two metrics: