Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The mechanism to extract a timestamp from JSON needs generalising #348

Open
amrc-benmorrow opened this issue Oct 1, 2024 · 0 comments
Open
Labels
design issue There is a design problem here

Comments

@amrc-benmorrow
Copy link
Contributor

Currently when an Edge Agent connection returns JSON, the Edge Agent will automatically (and unconfigurably) look for a timestamp property and treat this as the metric timestamp. This is obviously incorrect and unsafe; there is no way of knowing the timestamp property is supposed to be interpreted as a metric timestamp.

This is a useful feature but needs to be configurable. This means:

  • A 'timestamp path' alongside the existing 'path' configuration for each metric. I don't think we want to support timestamps read from a different address.
  • A 'timestamp format' giving options of at least 'Unix seconds' and 'Unix milliseconds'. We should also allow other sensible things, like ISO date strings and maybe other epochs.

The timestamps parsed from the data MUST be sanity checked. Publishing data way in the past or in the future as a result of a mis-parsed timestamp will play havok with the database.

@amrc-benmorrow amrc-benmorrow added the design issue There is a design problem here label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design issue There is a design problem here
Projects
None yet
Development

No branches or pull requests

1 participant