Investigate splitting search ghetto stats in Datadog

Bug #1302121 reported by Tres Seaver
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL3
Fix Released
Medium
Tres Seaver

Bug Description

As with connection stats (#1302111), the statistics logged from each appserver to Datadog mingle the 'search' and the 'main' instances. Figure out how to split those out.

Revision history for this message
Tres Seaver (tseaver) wrote :

Experimenting with using the Supervisord 'environment' setting to influence the appserver's logging.

Changed in karl3:
status: New → In Progress
Revision history for this message
Tres Seaver (tseaver) wrote :
Revision history for this message
Tres Seaver (tseaver) wrote :
Revision history for this message
Tres Seaver (tseaver) wrote :

Running supervisord to show environment variables being used::

    $ bin/supervisord -c supervisord.conf
    $ bin/supervisorctl -c supervisord.conf
    test1 RUNNING pid 20356, uptime 0:00:04
    test2 RUNNING pid 20357, uptime 0:00:04
    supervisor> tail test1
    ENVTEST: test1
    ENVTEST: test1

    supervisor> tail test2
    ENVTEST: test2
    ENVTEST: test2

    supervisor> shutdown
    Really shut the remote supervisord process down y/N? y
    Shut down
    supervisor>

Revision history for this message
Tres Seaver (tseaver) wrote :

Rather than hack in stuff via the environment, we should be able to
define a new '[pipeline:search]' and '[app:karlserve-search]' sections
in the 'etc/karlserve.ini' file. Those sections would be based on
'[pipeline:main]' and '[app:karlserve], overriding the configuration
settings we need. E.g.::

    [app:karlserve-search]
    use = karlserve
    connection_stats_filename = %(here)s/../var/log/search_connection_stats.csv
    connection_stats_threshhold = 0.1

    [pipeline:search]
    pipeline =
        egg:guillotine#guillotine
        egg:Paste#evalerror
        egg:karl#timeit
        browserid
        karlserve-search

We can then pass '--application-name=search' in via the command line
entry in 'etc/supervisord.conf' to select that pipeline.

Revision history for this message
Tres Seaver (tseaver) wrote :

Of course, that example is actually for https://bugs.launchpad.net/karl3/+bug/1302111.

Revision history for this message
Tres Seaver (tseaver) wrote :

From looking at the 'perfmetrics' code, the tweak we need here is to add a '?prefix=search' to the 'statsd_uri' for the search appserver. E.g., instead of::

  statsd_uri = http://localhost:8125/

use::

 statsd_uri = http://localhost:8125/?prefix=search

Revision history for this message
Tres Seaver (tseaver) wrote :

The configuration change is now checked into osideploy and rolled out to staging.

Paul, can you give me access to the Datadog instance to verify that the search stats are being split out?

Changed in karl3:
assignee: Tres Seaver (tseaver) → Paul Everitt (paul-agendaless)
status: In Progress → Fix Committed
Revision history for this message
Paul Everitt (paul-agendaless) wrote : Re: [Bug 1302121] Investigate splitting search ghetto stats in Datadog

FWIW, the DataDog agent wasn't running on staging, but I suspect you know that and started it.

--Paul

On Apr 4, 2014, at 3:06 PM, Tres Seaver <email address hidden> wrote:

> The configuration change is now checked into osideploy and rolled out to
> staging.
>
> Paul, can you give me access to the Datadog instance to verify that the
> search stats are being split out?
>
> ** Changed in: karl3
> Status: In Progress => Fix Committed
>
> ** Changed in: karl3
> Assignee: Tres Seaver (tseaver) => Paul Everitt (paul-agendaless)
>
> --
> You received this bug notification because you are subscribed to KARL3.
> https://bugs.launchpad.net/bugs/1302121
>
> Title:
> Investigate splitting search ghetto stats in Datadog
>
> Status in KARL3:
> Fix Committed
>
> Bug description:
> As with connection stats (#1302111), the statistics logged from each
> appserver to Datadog mingle the 'search' and the 'main' instances.
> Figure out how to split those out.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/karl3/+bug/1302121/+subscriptions

Revision history for this message
Tres Seaver (tseaver) wrote :

This change is *not* checked in or rolled out anywhere (I appear to have confused #130211's work).

Changed in karl3:
assignee: Paul Everitt (paul-agendaless) → Tres Seaver (tseaver)
status: Fix Committed → In Progress
Revision history for this message
Tres Seaver (tseaver) wrote :

*Now* the change is checked in and rolled out to staging.

Changed in karl3:
status: In Progress → Fix Committed
Revision history for this message
Tres Seaver (tseaver) wrote :

Rolled out to production.

Changed in karl3:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.