Skip to content

Commit

Permalink
Drop fetch phase on old recorder (#155)
Browse files Browse the repository at this point in the history
* fix(eventrecorder): don't record fetch

don't record fetch on old recorder to maintain compatibility

* Update pkg/eventrecorder/eventrecorder.go

Co-authored-by: Rod Vagg <rod@vagg.org>

---------

Co-authored-by: Rod Vagg <rod@vagg.org>
  • Loading branch information
hannahhoward and rvagg authored Mar 15, 2023
1 parent ee1c2bd commit ccf3ec7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/eventrecorder/eventrecorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ func toStrings(protocols []multicodec.Code) []string {
}

func (er *EventRecorder) RecordEvent(event types.RetrievalEvent) {
if event.Phase() == types.FetchPhase {
// ignored for now because it's not recognized upstream
return
}
if er.cfg.DisableIndexerEvents && event.Phase() == types.IndexerPhase {
// ignore indexer events for now, it can get very chatty in the autoretrieve
// case where every request results in an indexer lookup
Expand Down

0 comments on commit ccf3ec7

Please sign in to comment.