Skip to content
This repository was archived by the owner on Mar 15, 2024. It is now read-only.

Add tracking of graphsync failures #31

Merged
merged 1 commit into from
Mar 28, 2023
Merged

Conversation

hannahhoward
Copy link
Collaborator

@hannahhoward hannahhoward commented Mar 28, 2023

Goals

Determine how often initiated graphsync requests are actually failing, versus just getting cancelled..

Implementation

  • Add a failure count for graphsync requests that actually fail
  • also tag our errors by protocol so we can filter them.

For discussion

The failure here is a bit divergent with how we count things elsewhere. Most of our other metrics are "0 or 1 per request" -- i.e. across the entire request, it either happened or didn't happen. However you can get multiple failures with SPs. While we can record failures on a per request basis, I think it's more informative in terms of "are SPs succeeding" to count each failed attempt individually.

@@ -28,7 +28,9 @@ func (m *Metrics) HandleFailureEvent(ctx context.Context, id types.RetrievalID,
_ = m.tempDataMap.Delete(id)
m.requestWithIndexerFailures.Add(ctx, 1)
case types.RetrievalPhase:

if storageProviderID != types.BitswapIndentifier {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not use the protocol() helper function here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

protocol is a bit different. it does the string conversion to "graphsync" versus "bitswap"? I guess it doesn't matter.

@hannahhoward hannahhoward merged commit 27dd0ac into main Mar 28, 2023
@hannahhoward hannahhoward deleted the feat/track-failure-counts branch March 28, 2023 17:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants