Logger threshold/count

I have a few integrations (a mix of core & third party) that connect to somewhat unreliable upstream sources and maybe 3-4 times a day they each throw data connection errors. These are usually one-off and can be ignored; the next sync a few minutes later usually succeeds and the data is up-to-date again. However, occasionally the APIs are truly down and I would like to know when that’s the case.

Given the above, are there any ways to set a threshold or rolling window counter which ignores these one-off errors, but will actually start logging if it receives a certain number within a set timeframe, e.g. if, within a 60 minute period there’s 1 or 2 errors, ignore them, but if there are greater than 10, stop ignoring and log them.

I don’t think the logger integration has this capability by itself, but perhaps there’s a way using automations?