How to find which tag is triggering Historical Sink Does Not Exist error in gateway

I have taken some resources from another project and I have 1 tag that is filling the logs up with errors because it is referring to the old project database, however I can’t see which is causing the issue. Is there any loggers I can change the level on and filter to find the offending tag?

I would export all the tags and search the JSON for:

"historyProvider": "<Name of Sink that doesn't exist>",

@deon.korb I tried that but wasn’t able to find anything in the tags.

I set the history logger to trace level and I’m only getting this from the offending DB, It’s like it’s trying to store a non existent tag? What else could cause this?

Edit: I restarted the gateway and the error has gone, but I’m still not sure why it happened.