Page MenuHomePhabricator

Setup dashboard for performance survey responses
Closed, ResolvedPublic

Description

This will allow us to easily visualize differences between wikis and the evolution of responses over time.

Event Timeline

Gilles triaged this task as Medium priority.Jun 6 2018, 9:05 AM
Gilles created this task.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Gilles renamed this task from Setup Dashiki dashboard for performance survey responses to Setup dashboard for performance survey responses.Jun 6 2018, 9:41 AM

I came up with this code and tested it successfully on stat1005:

import json
import statsd
from kafka import KafkaConsumer

consumer = KafkaConsumer('eventlogging_QuickSurveysResponses', group_id='perf-survey-kafka-to-statsd', bootstrap_servers=['kafka-jumbo1001.eqiad.wmnet:9092'])
statsd_client = statsd.StatsClient('statsd.eqiad.wmnet', 8125)

for msg in consumer:
    object = json.loads(msg.value)
    wiki = object['wiki']
    # Example: ext-quicksurveys-example-internal-survey-answer-neutral
    response = object['event']['surveyResponseValue'][48:]
    key = 'performance.survey.{}.{}'.format(wiki, response)
    print key
    statsd_client.incr(key)

It's a small daemon that forwards the response values per wiki to statsd from the EventLogging kafka. This will allow us to easily graph this in Grafana.

It's probably best to run this code on one of the performance team's production servers. I'll find a home for it in Puppet.

Turns out, it can piggy-back on our navtiming python daemon!

Change 437731 had a related patch set uploaded (by Gilles; owner: Gilles):
[performance/navtiming@master] Collect performance survey response metrics

https://gerrit.wikimedia.org/r/437731

Change 437731 merged by jenkins-bot:
[performance/navtiming@master] Collect performance survey response metrics

https://gerrit.wikimedia.org/r/437731

Here it is: https://grafana.wikimedia.org/dashboard/db/performance-perception-survey?orgId=1

Not enough data for even cawiki to render properly, though. When there's more data I'll switch to aggregating by 24-hour period and looking at a 7-day period.

Vvjjkkii renamed this task from Setup dashboard for performance survey responses to 7jbaaaaaaa.Jul 1 2018, 1:05 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Gilles as the assignee of this task.
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
Lofhi renamed this task from 7jbaaaaaaa to Setup dashboard for performance survey responses.Jul 1 2018, 6:48 AM
Lofhi closed this task as Resolved.
Lofhi assigned this task to Gilles.
Lofhi lowered the priority of this task from High to Medium.
Lofhi updated the task description. (Show Details)
Lofhi added subscribers: gerritbot, Aklapper.