Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Collects anonymous stats from pg-extras usage

Notifications You must be signed in to change notification settings

heroku/pg-extras-stat-collector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PG Extras Stat Collector

A simple project that collects usage information from the pg-extras plugin. The project consists of two parts, additions to the pg-extras plugin to send usage data, and a simple Sinatra app to receive it.

The Sinatra app receives a single POST containing a string representing the command ran. This is inserted into a database along with a timestamp and we can use Dataclips to analyze / publish later.

The CLI plugin is extended to do two things; prompt for opt in/out of collection, and sending the POST. After installing/upgrading the plugin, the user is prompted to opt in/out of the collection with a simple y|n option (default y). Both options set a config file in the existing ~/.heroku/ folder, with a setting opt-in:true|false value.

For every command ran in the plugin, a background thread will check the this config file and the value in it. If yes, the command is posted to the Sinatra app. A thread is used to help ensure this process doesn't interfere with normal usage. The plugin does not wait for or ensure the POST completes.

About

Collects anonymous stats from pg-extras usage

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%