FrankChen021 / bithon

An observability platform mainly for Java
Apache License 2.0
15 stars 4 forks source link

Generic metric schema #561

Open FrankChen021 opened 1 year ago

FrankChen021 commented 1 year ago

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:

  1. define a generic schema for these metrics
    1. dataSource/timestamp/appName/instanceName/metrics
  2. improve the writing and if no schema defined, use the generic one
  3. 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