schema metrics have great positive performance and cost gain while paying a little price for management complexity.
To make it more generic for metrics that don't want schema support, we have to improve the system by:
define a generic schema for these metrics
dataSource/timestamp/appName/instanceName/metrics
improve the writing and if no schema defined, use the generic one
improve the reading that if schema defined for target data source, use the generic one and re-write the queries
For underlying storage, such as H2(local dev only), we can only use String to store JSON formatted text, while for other storages, we can use some other types such as Map/Array/JSON
schema metrics have great positive performance and cost gain while paying a little price for management complexity. To make it more generic for metrics that don't want schema support, we have to improve the system by:
For underlying storage, such as H2(local dev only), we can only use String to store JSON formatted text, while for other storages, we can use some other types such as Map/Array/JSON