Page MenuHomePhabricator

Add basic statistics-gathering tools for the SymfonyBundle
Open, LowPublic5 Estimated Story Points

Description

In order to start providing better metrics for the tools we're building, we should add some of those metrics-gathering base tools to the SymfonyBundle that's shared across several tools, and reuse them.

Each system can then create specific overrides or uses that suits it.

Plan for execution:

We are planning to add stats support to the bundle, starting with base statistics for actions the bundle already has:

  • Implement a metric for successful OAuth callback (meaning "how many people successfully logged into the system") as a first metric to set up the system
  • Make sure that the development environment replaces the connection to statsd with a local file or similar, for testing and verification
  • Add tests
  • Add documentation to the bundle so tools can use it to instrument more metrics

Event Timeline

aezell subscribed.

We should discuss this in the Engineering Meeting to create concrete tasks that can be estimated.

Notes from the Engineering discussion:

  • There's already some stats being collected in Cloud, mostly for memory/performace. Example for EventMetrics: https://grafana-labs-admin.wikimedia.org/dashboard/db/labs-project-board?orgId=1&var-project=eventmetrics&var-server=All
  • We are planning to add stats support to the bundle, starting with base statistics for actions the bundle already has:
    • Implement a metric for successful OAuth callback (meaning "how many people successfully logged into the system") as a first metric to set up the system
    • Make sure that the development environment replaces the connection to statsd with a local file or similar, for testing and verification
    • Add tests

We added piwik support for Event Metrics which should give us the data this task asks for.

I still think this has value. However, should we constrain this work to SVG Translate because it primarily relies on the bundle (currently)?

@aezell If we are making this ticket SVGTranslate specific, I don't think we need to go through the trouble of putting a system in place for gathering metrics. Essentially, I just want the tool to log certain events in a plain old txt file. I can grep through it when I want to dig into something.
Of course, long term it needs to be something in the bundle but for now and for this tool, I think we can do without it.
Thoughts?

I'd agree that this is not required for SVG Translate. Is there a task to create the log file you describe?

If we drop this task now, I think it should be one of the first tasks we tackle when we use the bundle to build the next tool.

I'm still keen to learn about statsd and how to hook up our Symfony projects to send stats to it. If I'm reading correctly, doing that doesn't seem be much harder than logging the same info out to a text file, and would have the advantage of it being easier to set up a dashboard on Grafana on which to view the data. I may not be reading correctly. ;)

Yeah, I'd agree. That's why I said that it isn't "required" to do this work. However, as you say, if these statistics are needed in any form, doing them with statsd does make sense.

As part of another round of scope reduction, I've moved this on the Event Metrics board from "Waiting for sprint" to "Stuff we had wanted to do."

I was going to take the Community Tech tag off it altogether, but see it is also tagged to SVG. @Niharika, is this something you still think we will be doing for SVG? If not, please go ahead and pull the CommTech tag, or do what you think appropriate.

@jmatazzoni This ticket is for the Symphony bundle we developed (used by both Event Metrics and SVG Translate). While nether of those tools need this feature currently, it will undoubtedly be useful as we build more tools using the same bundle in future. I would take it off the SVG Translate Tool and Event Metrics boards but keep it on the Community-Tech board (under PM backlog) so we can come back to it when we reuse the bundle in future (not for a while). Alternately, we can setup a new tag for the bundle related tasks.

Niharika added a project: Tools.