The keystone.contrib.stats.core Module

class keystone.contrib.stats.core.Driver

Bases: object

Interface description for a Stats driver.

get_stats(api)

Retrieve all previously-captured statistics for an interface.

increment_stat(api, category, value)

Increment the counter for an individual statistic.

set_stats(api, stats_ref)

Update statistics for an interface.

class keystone.contrib.stats.core.Manager

Bases: keystone.common.manager.Manager

Default pivot point for the Stats backend.

See keystone.common.manager.Manager for more details on how this dynamically calls the backend.

class keystone.contrib.stats.core.StatsController

Bases: keystone.common.wsgi.Application

get_stats(context)
reset_stats(context)
class keystone.contrib.stats.core.StatsExtension(application, mapper=None)

Bases: keystone.common.wsgi.ExtensionRouter

Reports on previously-collected request/response statistics.

add_routes(mapper)
class keystone.contrib.stats.core.StatsMiddleware(*args, **kwargs)

Bases: keystone.common.wsgi.Middleware

Monitors various request/response attribute statistics.

capture_stats(host, obj, attributes)

Collect each attribute from the given object.

process_request(request)

Monitor incoming request attributes.

process_response(request, response)

Monitor outgoing response attributes.

request_attributes = ['application_url', 'method', 'path', 'path_qs', 'remote_addr']
response_attributes = ['status_int']

Previous topic

The keystone.contrib.stats.backends.kvs Module

Next topic

The keystone.contrib.user_crud.core Module

This Page