Skip to content
Browse files

remove api stuff, now uses exprd

  • Loading branch information...
1 parent 0b55543 commit 748f7cf7d1a9c18add4b159d85dd11511f224a85 @mmcgrana mmcgrana committed May 5, 2012
Showing with 0 additions and 298 deletions.
  1. +0 −298 src/pulse/def.clj
View
298 src/pulse/def.clj
@@ -1205,246 +1205,6 @@
(per-minute
(fn [evt] (and (cloud? evt) (kv? evt :level "err") (kv? evt :source "codex")))))
-; api
-
-(defn core? [evt]
- (and (cloud? evt) (or (kv? evt :source "core") (kv? evt :source "core-unicorn"))))
-
-(defstat api-worker-jobs-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :worker) (start? evt)))))
-
-(defstat api-worker-retries-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :worker) (start? evt) (k? evt :attempts) (>? evt :attempts 0)))))
-
-(defstat api-worker-unhandled-exceptions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :worker) (error? evt)))))
-
-(defstat api-worker-jobs-delay
- (mean 60
- (fn [evt] (and (core? evt) (k? evt :worker) (start? evt) (kv? evt :attempts 0)))
- :queue_time))
-
-(defstat api-worker-jobs-time
- (mean 60
- (fn [evt] (and (core? evt) (k? evt :worker) (finish? evt)))
- :elapsed))
-
-(defstat api-requests-per-second
- (per-second
- (fn [evt] (and (core? evt) (k? evt :access_info)))))
-
-(defstat api-request-user-errors-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :api_error)))))
-
-(defstat api-response-500-errors
- (per-minute
- (fn [evt] (and (nginx-request? evt) (kv? evt :http_domain "api.heroku.com") (kv? evt :http_status 500)))))
-
-(defstat api-response-502-errors
- (per-minute
- (fn [evt] (and (nginx-request? evt) (kv? evt :http_domain "api.heroku.com") (kv? evt :http_status 502)))))
-
-(defstat api-response-503-errors
- (per-minute
- (fn [evt] (and (nginx-request? evt) (kv? evt :http_domain "api.heroku.com") (kv? evt :http_status 503)))))
-
-(defstat api-response-504-errors
- (per-minute
- (fn [evt] (and (nginx-request? evt) (kv? evt :http_domain "api.heroku.com") (kv? evt :http_status 504)))))
-
-(defstat api-request-time
- (mean 60
- (fn [evt] (and (core? evt) (k? evt :access_info)))
- :elapsed))
-
-(defstat api-developer-actions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :developer_action)))))
-
-(defstat api-creates-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :developer_action) (kv? evt :action "create_app")))))
-
-(defstat api-destroys-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :app) (k? evt :destroy) (start? evt)))))
-
-(defstat api-releases-per-minute
- (per-minute
- (fn [evt] (and (cloud? evt) (k? evt :capture_release)))))
-
-(defstat api-deploys-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :developer_action) (kv? evt :action "deploy")))))
-
-(defstat api-runs-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :developer_action) (kv? evt :action "ps_run")))))
-
-(defstat api-restarts-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :developer_action) (kv? evt :action "restart_ps")))))
-
-(defstat api-scales-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :developer_action) (kv? evt :action "ps_scale")))))
-
-(defstat api-config-changes-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :developer_action) (or (kv? evt :action "config_add") (kv? evt :action "config_remove"))))))
-
-(defstat api-logs-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :developer_action) (kv? evt :action "logs")))))
-
-(defstat api-ps-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :service_api) (kv? evt :action "visible") (kv? evt :attempt 1) (start? evt)))))
-
-(defstat api-configs-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :developer_action) (kv? evt :action "config_list")))))
-
-(defstat api-shen-provisions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :shen) (k? evt :create) (start? evt)))))
-
-(defstat api-shen-async-provisions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :shen) (k? evt :create) (kv? evt :async true) (start? evt)))))
-
-(defstat api-shen-async-provision-time
- (mean 60
- (fn [evt] (and (core? evt) (k? evt :db_up)))
- :elapsed))
-
-(defstat api-shen-sync-provisions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :shen) (k? evt :create) (kv? evt :async false) (start? evt)))))
-
-(defstat api-shen-sync-provision-time
- (mean 60
- (fn [evt] (and (core? evt) (k? evt :shen) (k? evt :create) (kv? evt :async false) (finish? evt)))
- :elapsed))
-
-(defstat api-codex-provisions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :init_codex) (kv? evt :stateless_codex false) (start? evt)))))
-
-(defstat api-codex-provision-time
- (mean 60
- (fn [evt] (and (core? evt) (k? evt :repo_up)))
- :elapsed))
-
-(defstat api-taps-sessions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :taps) (start? evt)))))
-
-(defstat api-taps-unhandled-exceptions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :taps) (error? evt)))))
-
-(defstat api-taps-time
- (mean 60
- (fn [evt] (and (core? evt) (k? evt :taps) (finish? evt)))
- :elapsed))
-
-(defstat api-deployhooks-runs-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :deployhooks) (kv? evt :action "run") (start? evt)))))
-
-(defstat api-deployhooks-user-errors-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :deployhooks) (kv? evt :action "run") (k? evt :user_error)))))
-
-(defstat api-deployhooks-unhandled-exceptions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :deployhooks) (kv? evt :action "run") (k? evt :error)))))
-
-(defstat api-deployhooks-time
- (mean 60
- (fn [evt] (and (core? evt) (k? evt :deployhooks) (kv? evt :action "run") (finish? evt)))
- :elapsed))
-
-(defstat api-s3-copies-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :s3_helper) (k? evt :copy) (start? evt)))))
-
-(defstat api-s3-copy-unhandled-exceptions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :s3_helper) (k? evt :copy) (or (kv? evt :at "failed") (kv? evt :event "failed"))))))
-
-(defstat api-s3-copy-time
- (mean 60
- (fn [evt] (and (core? evt) (k? evt :s3_helper) (k? evt :copy) (finish? evt)))
- :elapsed))
-
-(defstat api-logplex-api-requests-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :logplex) (start? evt)))))
-
-(defstat api-logplex-provisions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :logplex) (k? evt :create_channel) (start? evt)))))
-
-(defstat api-logplex-deprovisions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :logplex) (k? evt :delete_channel) (start? evt)))))
-
-(defstat api-logplex-sessions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :logplex) (k? evt :create_session) (start? evt)))))
-
-(defstat api-logplex-api-errors-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :logplex) (error? evt)))))
-
-(defstat api-logplex-api-unhandled-exceptions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :logplex) (error? evt)))))
-
-(defstat api-logplex-api-time
- (mean 60
- (fn [evt] (and (core? evt) (k? evt :logplex) (finish? evt)))
- :elapsed))
-
-(defstat api-http-redis-retries-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :redis_helper) (k? evt :retry)))))
-
-(defstat api-http-redis-timeouts-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :redis_helper) (kv? evt :at "error")))))
-
-(defstat api-psmgr-api-requests-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :service_api) (start? evt)))))
-
-(defstat api-psmgr-api-errors-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :service_api)
- (or (kv? evt :event "unprocessable") (kv? evt :event "timeout") (kv? evt :event "broken") (error? evt))))))
-
-(defstat api-psmgr-api-unhandled-exceptions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (k? evt :service_api) (error? evt)))))
-
-(defstat api-psmgr-api-time
- (mean 60
- (fn [evt] (and (core? evt) (k? evt :service_api) (finish? evt)))
- :elapsed))
-
-(defstat api-unhandled-exceptions-per-minute
- (per-minute
- (fn [evt] (and (core? evt) (or (k? evt :unhandled-exception) (and (k? evt :worker) (error? evt)))))))
-
-(defstat api-events-per-second
- (per-second core?))
-
; data
(defstat shen-errors-per-minute
@@ -1676,64 +1436,6 @@
slugc-mean-compile-time
codex-errors-per-minute
- ; api
- api-worker-jobs-per-minute
- api-worker-retries-per-minute
- api-worker-unhandled-exceptions-per-minute
- api-worker-jobs-delay
- api-worker-jobs-time
- api-requests-per-second
- api-request-user-errors-per-minute
- api-response-500-errors
- api-response-502-errors
- api-response-503-errors
- api-response-504-errors
- api-request-time
- api-developer-actions-per-minute
- api-creates-per-minute
- api-destroys-per-minute
- api-releases-per-minute
- api-deploys-per-minute
- api-runs-per-minute
- api-restarts-per-minute
- api-scales-per-minute
- api-config-changes-per-minute
- api-logs-per-minute
- api-ps-per-minute
- api-configs-per-minute
- api-shen-provisions-per-minute
- api-shen-async-provisions-per-minute
- api-shen-async-provision-time
- api-shen-sync-provisions-per-minute
- api-shen-sync-provision-time
- api-codex-provisions-per-minute
- api-codex-provision-time
- api-taps-sessions-per-minute
- api-taps-unhandled-exceptions-per-minute
- api-taps-time
- api-deployhooks-runs-per-minute
- api-deployhooks-user-errors-per-minute
- api-deployhooks-unhandled-exceptions-per-minute
- api-deployhooks-time
- api-s3-copies-per-minute
- api-s3-copy-unhandled-exceptions-per-minute
- api-s3-copy-time
- api-logplex-api-requests-per-minute
- api-logplex-provisions-per-minute
- api-logplex-deprovisions-per-minute
- api-logplex-sessions-per-minute
- api-logplex-api-errors-per-minute
- api-logplex-api-unhandled-exceptions-per-minute
- api-logplex-api-time
- api-http-redis-retries-per-minute
- api-http-redis-timeouts-per-minute
- api-psmgr-api-requests-per-minute
- api-psmgr-api-errors-per-minute
- api-psmgr-api-unhandled-exceptions-per-minute
- api-psmgr-api-time
- api-unhandled-exceptions-per-minute
- api-events-per-second
-
; data
shen-errors-per-minute

0 comments on commit 748f7cf

Please sign in to comment.
Something went wrong with that request. Please try again.