User Feedback UI
Open, Needs TriagePublic

Description

I've been trying to fix UserFeedbackConsole. I'm at the conclusion that we need to fundamentally change how it works internally and at that point we may as well look at other options.
There seem to be 3rd party metric dashboards which can be dropped in which will fix all our issues and potentially provide a lot lot more.

UserFeedbackConsole

Pros:

  • Exists
  • Generates UI automatically from schema
  • Complete control

Cons:

  • Downloads entire database
  • Sloooooow/broken
  • Can't do custom queries

Grafana

https://grafana.com

Pros:

  • Used in kde sysadmin already
  • Dave has a demo with kde telemetry
  • Can import dashboards from JSON(i.e we could script the generation)
  • Good time series support
  • Easy to deploy
  • Read only mode can publicly show aggregated stats without raw data access

Cons:

  • Heavy focus on "realtime" and timebased things that we have to work round.
  • Few graph types (not even a pie chart) without plugins.

Metabase

https://www.metabase.com/

Pros:

  • Designed around "questions" - you create transient or persistent queries which can be complex and then visualise it. Seems perfect for answering things like "how many panels do users with two screens use" and other more complex things.
  • More visualisations than grafana

Cons:

  • Gitlab style "premium"+open source model
  • Java (but has a docker image)
  • May need to do time series queries manually
  • Maybe overkill?

Apache superset

https://superset.incubator.apache.org/

Pros:

  • The most graph types
  • Semantically mark the table, then things are mostly automagic

Cons:

  • Apparently can't do joins natively in the frontend. We will need to create views in the SQL separately
  • May need to do time series queries manually

Note: UserFeedbackConsole would still be needed for schema editing and surveys

davidedmundson added a comment.EditedSep 10 2020, 9:17 AM

I'll also dump what I've done in grafana:

Non-scalar data is just about usable with the UI query generator, but frankly it's easier to just write some SQL
Scalar data can only be fetched with the custom query.


And the relevant SQL backing that. Probably reusable elsewhere with the $__ macros expanded.

Qt version

SELECT
  $__timeGroupAlias(col_timestamp,7d),
  col_data_qtversion_value AS metric,
  count(col_id) AS total
FROM pd_org_kde_plasmashell
WHERE
  $__timeFilter(col_timestamp) # apply date range from UI
GROUP BY 1,2 # group by per week, and by the qt version
HAVING count(col_id) > 10 # filter out developer noise
ORDER BY $__timeGroup(col_timestamp,7d)
SELECT
    NOW() AS "time",
    concat(screens.col_data_screens_width, ' x ', screens.col_data_screens_height) AS metric,
    COUNT(screens.col_id) AS final_count
FROM pd_org_kde_plasmashell
INNER JOIN pd2_org_kde_plasmashell__screens AS screens ON pd_org_kde_plasmashell.col_id = screens.col_sample_id
WHERE   $__timeFilter(col_timestamp) # apply date range from UI

GROUP BY screens.col_data_screens_width,screens.col_data_screens_height
HAVING COUNT(screens.col_id) > 100

# Note this is the number of samples, not the number of people with said monitor. 
# Date range is applied but we don't group by week or anything

Usage time for displaying in a heatmap
NEEDS VERIFICATION

SELECT
  $__timeGroupAlias(col_timestamp,7d),
  $__unixEpochGroup(col_data_usagetime_value, 1h) AS metric,
  count(col_id) AS total
FROM pd_org_kde_plasmashell
WHERE
  $__timeFilter(col_timestamp) # apply date range from UI
  AND col_data_usagetime_value > 0
GROUP BY 1,2 # group by per week, and by the time usage
ORDER BY $__timeGroup(col_timestamp,7d)

I tried to look into the "Value" GPU vendor issue, but I'm not seeing that in the raw data at all? Could be those are the ones not containing any GPU data at all?

I tried to look into the "Value" GPU vendor issue, but I'm not seeing that in the raw data at all? Could be those are the ones not containing any GPU data at all?

Sorry should have said. Yeah, it's NULL and "value" comes from my UI.
Newer queries have that resolved.