Measuring Always On Availability Group potential data loss I have read these articles few times. I do monitor potential data loss today using some of the methods described in these articles.

Measuring Availability Group synchronization lag by Derik Hammer
Monitor Performance for AlwaysOn Availability Groups
Monitoring Availability Group Replica Synchronization by Jonathan Kehayias

Reading these articles and the description of dynamic management views and performance counters, I do not see any way to measure the exact time for potential data loss if Primary goes down now.
I did inquire about using log sequence number (LSN) values from sys.dm_hadr_database_replica_states. Found out only certain LSN's has a timestamp. Plus, continuously querying the timestamp of those particular LSN is probably not a practical solution.
Do you know how to get the exact time for potential data loss at any given time?
A hypothetical solution will be finding the oldest LSN's timestamp that has not been copied to the secondary.
I've occassionally created specific tables for this purpose, sometimes called &quot;tracer&quot; or &quot;canary&quot; tables. It has one column which is a datetime. A job runs on the source system inserting the current time. This runs at whatever granularity you need - minutes apart was sufficient for me. Read the max value from the secondary &amp; that's how far behind you are.