instrumental_agent 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +10 -0
- data/CHANGELOG.md +3 -0
- data/README.md +4 -2
- data/lib/instrumental/capistrano.rb +6 -1
- data/lib/instrumental/version.rb +1 -1
- metadata +6 -5
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Instrumental Agent
|
2
2
|
|
3
|
-
|
3
|
+
Measure your application in real time.
|
4
4
|
|
5
5
|
## Setup & Usage
|
6
6
|
|
@@ -10,7 +10,7 @@ Add the gem to your Gemfile.
|
|
10
10
|
gem 'instrumental_agent'
|
11
11
|
```
|
12
12
|
|
13
|
-
Visit [instrumentalapp.com](instrumentalapp.com) and create an account, then initialize the agent with your API key, found in the Docs section.
|
13
|
+
Visit [instrumentalapp.com](https://instrumentalapp.com) and create an account, then initialize the agent with your API key, found in the Docs section.
|
14
14
|
|
15
15
|
```sh
|
16
16
|
I = Instrumental::Agent.new('YOUR_API_KEY', :enabled => Rails.env.production?)
|
@@ -89,6 +89,8 @@ after "deploy:migrations", "instrumental:util:deploy_end"
|
|
89
89
|
after "instrumental:util:deploy_end", "instrumental:record_deploy_notice"
|
90
90
|
```
|
91
91
|
|
92
|
+
The default message sent is "USER deployed COMMIT_HASH". If you need to customize it, set a capistrano variable named `deploy_message` to the value you'd prefer.
|
93
|
+
|
92
94
|
## Tracking metrics in Resque jobs (and Resque-like scenarios)
|
93
95
|
|
94
96
|
If you plan on tracking metrics in Resque jobs, you will need to explicitly cleanup after the agent when the jobs are finished. You can accomplish this by adding `after_perform` and `on_failure` hooks to your Resque jobs. See the Resque [hooks documentation](https://github.com/defunkt/resque/blob/master/docs/HOOKS.md) for more information.
|
@@ -26,7 +26,12 @@ if Capistrano::Configuration.instance
|
|
26
26
|
agent_options = { :synchronous => true }
|
27
27
|
agent_options[:collector] = instrumental_host if exists?(:instrumental_host)
|
28
28
|
agent = Instrumental::Agent.new(instrumental_key, agent_options)
|
29
|
-
|
29
|
+
message = if exists?(:deploy_message)
|
30
|
+
deploy_message
|
31
|
+
else
|
32
|
+
"#{deployer} deployed #{current_revision}"
|
33
|
+
end
|
34
|
+
agent.notice(message,
|
30
35
|
start_at,
|
31
36
|
deploy_duration_in_seconds)
|
32
37
|
logger.info("Notified Instrumental of deployment")
|
data/lib/instrumental/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instrumental_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2013-02-28 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rake
|
@@ -135,6 +135,7 @@ extra_rdoc_files: []
|
|
135
135
|
files:
|
136
136
|
- .gitignore
|
137
137
|
- .rspec
|
138
|
+
- .travis.yml
|
138
139
|
- CHANGELOG.md
|
139
140
|
- Gemfile
|
140
141
|
- Guardfile
|
@@ -164,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
164
165
|
version: '0'
|
165
166
|
segments:
|
166
167
|
- 0
|
167
|
-
hash: -
|
168
|
+
hash: -2246520972920567467
|
168
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
170
|
none: false
|
170
171
|
requirements:
|
@@ -173,10 +174,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
174
|
version: '0'
|
174
175
|
segments:
|
175
176
|
- 0
|
176
|
-
hash: -
|
177
|
+
hash: -2246520972920567467
|
177
178
|
requirements: []
|
178
179
|
rubyforge_project:
|
179
|
-
rubygems_version: 1.8.
|
180
|
+
rubygems_version: 1.8.25
|
180
181
|
signing_key:
|
181
182
|
specification_version: 3
|
182
183
|
summary: Agent for reporting data to instrumentalapp.com
|