Plan icon indicating copy to clipboard operation
Plan copied to clipboard

DataExtension Graph API: Arbitrary graph metric sampler

Open AuroraLS3 opened this issue 3 years ago • 1 comments

I would like to be able to..

Gather numeric data from any source and sample it similar to the performance metrics.

Is your feature request related to a problem? Please describe.

Data from other plugins could use some graphs.

In addition some data could be sampled automatically, such as DataExtension group development over time

To take into consideration:

  • Provide a method that samples single datapoint when called
    • Allow specifying sample interval
    • Allow specifying multiple values for one datapoint
    • Allow specifying if the values should be stacked by default when graphed (In future it might be possible to allow user to choose)
    • Allow specifying formatter, time for example
  • Provide a method that adds multiple samples when called
    • Strategy: REPLACE_ALL or APPEND_ALL
    • Limit REPLACE_ALL to 1000 datapoints due to replacement strategy being slow
  • Support different data types
    • Double
    • Long
    • time amount
    • ~~percentage~~
  • Allow specifying if graph supports aggregation:
    • sum over time
    • average over time
    • min / max over time
  • Allow defining x-axis
    • date by default
    • value index if defined
  • Needs to provide graph metadata
    • Graph name
    • Value unit names (Use multiple y-axis if necessary, aggregate axis by unit name)
    • Series names (Since datapoint can have multiple values)
  • Automatically generated cleanup strategy in the config under the specific plugin.

~~Special case:~~

  • ~~Pie / Bar chart: Single datapoint with multiple values~~
    • ~~Should this support drilldown data?~~

Future considerations:

  • PlaceholderAPI support

Implementation considerations:

  • I figure it might make sense to create a new table for each graph.
  • Have a metadata table for plugin-server-player-graph relations
  • Have a metadata table for graph metadata
  • Generate SQL using the metadata
  • Access through a generic graph data endpoint
  • Needs the React frontend for extensions before generic enough graphs could be easy to do.

AuroraLS3 avatar Aug 12 '22 05:08 AuroraLS3

I would like this because graphs for 3rd party plugins would be good for a lot of things. I myself want to have metrics being graphed instead of just being number values on the plugins overview page.

ItsJuls avatar Jun 21 '24 11:06 ItsJuls