astraly-labs / pragma-node

Pragma API
https://docs.pragma.build/Resources/PragmApi/overview
MIT License
2 stars 1 forks source link

dev: Update naive timestamps with UTC timezones #44

Open akhercha opened 6 months ago

akhercha commented 6 months ago

Current Behavior

Currently, we store timestamps without any timezone information. This is a bad practice as it could lead to wrong interpretations at later stages.

Expected Behavior

akhercha commented 6 months ago

Changes reverted in

Those caused new entries to not be published & we had TimeSinceLastUpdateTooHigh alerts (causing WrongPrice alerts later).

Labels:
 - alertname = TimeSinceLastUpdateTooHigh
 - group = API
  - job = prometheus_monitoring
 - network = Testnet
 - pair = BTC/USD
 - severity = warning
Annotations:
 - description = The time since the last update for BTC/USD has exceeded 1800 seconds.
 - summary = Time since the last update is too high
Labels:
 - alertname = TimeSinceLastUpdateTooHigh
 - group = API
 - job = prometheus_monitoring
 - network = Testnet
 - pair = DAI/USD
 - severity = warning
Annotations:
 - description = The time since the last update for DAI/USD has exceeded 1800 seconds.
 - summary = Time since the last update is too high
Labels:
 - alertname = TimeSinceLastUpdateTooHigh
 - group = API
 - job = prometheus_monitoring
 - network = Testnet
 - pair = ETH/USD
 - severity = warning
Annotations:
 - description = The time since the last update for ETH/USD has exceeded 1800 seconds.
 - summary = Time since the last update is too high
Labels:
 - alertname = TimeSinceLastUpdateTooHigh
 - group = API
 - job = prometheus_monitoring
 - network = Testnet
 - pair = USDC/USD
 - severity = warning
Annotations:
 - description = The time since the last update for USDC/USD has exceeded 1800 seconds.
 - summary = Time since the last update is too high
Labels:
 - alertname = TimeSinceLastUpdateTooHigh
 - group = API
 - job = prometheus_monitoring
 - network = Testnet
 - pair = USDT/USD
 - severity = warning
Annotations:
 - description = The time since the last update for USDT/USD has exceeded 1800 seconds.
 - summary = Time since the last update is too high
Labels:
 - alertname = SourceDeviation
 - job = prometheus_monitoring
 - network = Testnet
 - pair = BTC/USD
 - severity = warning
 - source = BINANCE
 - type = future
Annotations:
 - description = The source deviation of BTC/USD from BINANCE has exceeded 2%.
 - summary = Source deviation is too high
Labels:
 - alertname = WrongPrice
 - job = prometheus_monitoring
 - network = Testnet
 - pair = BTC/USD
 - severity = warning
 - source = BINANCE
 - type = future
Annotations:
 - description = The price deviation of BTC/USD from BINANCE has exceeded 2.5%.
 - summary = Price deviation is too high

We reverted those changes and now everything works correctly.