moroshko / react-scanner

Extract React components and props usage from code.
MIT License
563 stars 40 forks source link

Feature request: Prometheus text output #53

Open mrmartan opened 1 year ago

mrmartan commented 1 year ago

Rather than having a custom json report output it would be useful to have the option to output the statistics in a prometheus compatible format. Then treat the metrics themselves as prometheus counters. That would give users the ability to store, aggregate, query and graph the data ober time and in larger organisations with many projects.

mrmartan commented 1 year ago

For example:

{
  "Text": 10,
  "Button": 5,
  "Link": 3
}  

would become

component_count{component_name="Text"} 10
component_count{component_name="Button"} 5
component_count{component_name="Link"} 3