tcell_agent 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fee1b53b8297dddbb44b9f4ae21b6371f61b138
4
- data.tar.gz: a78a2255a86ff92852a058b58699acd5537c13e1
3
+ metadata.gz: 0d9b3e090140bfef8909c88c6d26cbb2e3bda54c
4
+ data.tar.gz: 5d84637bdc6425a219ceb4f7c765b06362aa91e6
5
5
  SHA512:
6
- metadata.gz: 23478b101ec414872fb96958c4de2208ad099d898513636e50c5ff22b18ff660b4d73068e0ebfc405a9512c56426ef4d189753f03280c6e1d80d541ff0fd1476
7
- data.tar.gz: ea0ce97ae0cbf568cace44c6cfed0a39de4954bec81d0e5e2f012c0a7f710de4ddf19226024d36bac23c00bffdba93b9a64a2d54a69ec62355c5c8a8be37b903
6
+ metadata.gz: 77557ad760d818dc4d783c4c9152cb972460fdbd29d1ccf9a8b90b9894db6e73b977fb6472bffdcf98801881b60b898f003866e1a8ac6842db6eaf22e078895e
7
+ data.tar.gz: ec1759957174a2b22468ef73c614b2cd8511f859fdb76c5718e6de63d0c53f7afb028235d94775360969c6b40b6b7443fd19ef0d4af7f689130570ce3aec6511
data/README.md CHANGED
@@ -1,6 +1,82 @@
1
1
  # TCellAgent [![Build Status](https://magnum.travis-ci.com/tcellio/rubyagent-tcell.svg?token=j7YU3iPt38CqCoDeM83P)](https://magnum.travis-ci.com/tcellio/rubyagent-tcell)
2
2
 
3
- TCell Agent - Instruments Rails & Sinatra
3
+ TCell Agent - Instruments Rails
4
+
5
+ ## Release Process Checklist
6
+
7
+ Open a jira with the following checklist (sample: https://jira.tcell.io/browse/RA-98)
8
+
9
+
10
+ [ X ] unit tests pass
11
+ [ X ] integration tests pass
12
+ [ X ] test-kit tests pass (all variants)
13
+ [ X ] check test-kit logs for any unexpected errors
14
+ [ X ] performance tests pass (https://github.com/tcellio/load-testing/tree/master/agents)
15
+ [ X ] update changelog and version (sample https://github.com/tcellio/rubyagent-tcell/pull/275)
16
+
17
+ [ X ] manual install verified working (`make build`, install gem globally: `gem install tcell_agent-x.x.x.gem` works properly)
18
+ [ X ] run `tcell_agent test` command (might not be needed, since this is run in test-kit for every test-app)
19
+
20
+ [ X ] Update Master Branch
21
+
22
+ [ X ] ensure unknown_options accounts for any new keys (check `lib/tcell_agent/config/unknown_options.rb` file for logic)
23
+ [ X ] update support page in wiki with any new support (https://tcellio.atlassian.net/wiki/spaces/EN/pages/54460460/Server+Agent+Support)
24
+
25
+ Repeat if any bugs are found and patched
26
+
27
+ [ X ] merge master branch to release branch (this model was followed to make it easy to hotfix released versions)
28
+
29
+ [ X ] create release in github repo with release notes and appropriate version tag (https://github.com/tcellio/rubyagent-tcell/releases)
30
+ [ X ] run `make build` on release branch (`gem unpack tcell_agent-x.x.x.gem` and manually inspect .gem file to make sure no files are missing and no extra files are included)
31
+ [ X ] upload to rubygems (`gem push tcell_agent-x.x.x.gem`)
32
+ [ X ] confirm upload worked by running a test app that installs latest version from rubygems and smoke test
33
+
34
+ Common Manual Tests Before Release
35
+
36
+ Run a Test Kit test app with multiple worker processes and run the suite of tests against it (https://github.com/tcellio/tcell/compare/test-kit/run-multiple-worker-processes?expand=1)
37
+
38
+ Manually running a test app with multiple worker processes is temporary until this is implemented: https://jira.tcell.io/browse/TCEL-5298
39
+
40
+ Smoke test a test app. Make sure agent can report appfw, you can post forms, you can login/log out. Test server configurations that you can't test with test-kit. Like multiple worker processes.
41
+
42
+ Special Things
43
+
44
+ Config File - For rails applications config files are commonly stored in `config/` directory. Rubyagent is configured to look in `config/tcell_agent.config` by default for its configuration file.
45
+
46
+ Agent Home Owner - A customer experienced an issue where their web app master process ran as root but each worker process ran as a different user. This caused problems with the `tcell/` directory. If the master process created the directory then it was owned by root, so worker processes would raise permission exceptions when they tried to do any logging or write to the cache under the `tcell/`. `config.agent_home_owner` was introduced to allow the customer to specify the name of the user that should own `tcell/` so that worker process would not get permission exceptions when writing to it. This is no longer necessary with the newest agent version. The newest agent version doesn't do anything in the master process, everything is executed in the workers, so `tcell/` should have the correct permissions because it'll always be created by a worker process.
47
+
48
+ Rails Initializers: It's common for gems to be configured thru Rails initializers: https://guides.rubyonrails.org/v2.3/configuring.html#using-initializers. TCell rubyagent supports this as well. This means that certain rubyagent startup code that relies on configuration needs to run after Rails initializers have run. The rubyagent can be configured entirely thru initializers (as opposed to using tcell_agent.config file and/or ENV vars). Sample `config/initializers/tcell.rb` file:
49
+
50
+ ```
51
+ if defined?(TCellAgent)
52
+ TCellAgent.configure do |config|
53
+ config.app_id = "---APP_ID---"
54
+ config.api_key = "---API_KEY---"
55
+ config.agent_log_dir = "/tmp/tcelllogs"
56
+ config.agent_home_dir = "/tmp/tcellhome"
57
+ config.tcell_api_url = "https://api.tcell-preview.io/api/v1"
58
+ config.tcell_input_url = "https://input.tcell-preview.io/api/v1"
59
+ config.allow_payloads = true
60
+ # Removed for ruby 2.0
61
+ # config.agent_home_owner = "boris"
62
+ config.enabled = true
63
+ config.logging_options = {"enabled" => true, "level" => "DEBUG"}
64
+ config.host_identifier = "foomyserver"
65
+ config.log_tag = "TCELL_LOGS"
66
+ # Removed for ruby 2.0
67
+ # config.logger can no longer be supported after rubyagent v1.1.4 since logging is now handled by libtcellagent
68
+ # config.logger = Rails.logger
69
+ # or
70
+ # config.logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDOUT))
71
+ end
72
+ end
73
+ ```
74
+
75
+ Heroku Deployments - Rails apps are commonly deployed to Heroku. The biggest impact that has on the rubyagent is the agent log file. Heroku doesn't provide access to the filesystem, so the rubyagent needs the ability to log to STDOUT instead of a file. `log_tag` and `logger` settings in configuration were introduced to support this.
76
+
77
+ Log Tag (see above for example `log_tag` set in config) - Since rubyagent log can be printed to STDOUT along with all the other logging, `log_tag` is a custom string added to every log line to be able to filter just tcell log lines.
78
+
79
+ Logger object - Up until rubyagent v1.1.4 you could set a Rails.logger for the rubyagent to use for its logging. With the migration to have libtcellagent handle logging, that use case can no longer be supported. This feature was mainly used to get the rubyagent to log to STDOUT in heroku deployments. So as long as the agent supports some config to allow to log to STDOUT, this won't be missed.
4
80
 
5
81
  ## Installation
6
82
 
@@ -108,7 +108,11 @@ class IO
108
108
  end
109
109
  end
110
110
 
111
- tcell_original_popen(*args)
111
+ if block_given?
112
+ tcell_original_popen(*args, &Proc.new)
113
+ else
114
+ tcell_original_popen(*args)
115
+ end
112
116
  end
113
117
  end
114
118
  end
@@ -1,5 +1,5 @@
1
1
  # See the file "LICENSE" for the full license governing this code.
2
2
 
3
3
  module TCellAgent
4
- VERSION = '1.1.4'.freeze
4
+ VERSION = '1.1.5'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tcell_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-01 00:00:00.000000000 Z
11
+ date: 2019-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -106,7 +106,6 @@ files:
106
106
  - LICENSE
107
107
  - README.md
108
108
  - Rakefile
109
- - Readme.txt
110
109
  - bin/tcell_agent
111
110
  - lib/tcell_agent.rb
112
111
  - lib/tcell_agent/agent.rb
@@ -265,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
264
  version: '0'
266
265
  requirements: []
267
266
  rubyforge_project:
268
- rubygems_version: 2.4.8
267
+ rubygems_version: 2.5.2.3
269
268
  signing_key:
270
269
  specification_version: 4
271
270
  summary: tCell.io Agent for Rails
data/Readme.txt DELETED
@@ -1,7 +0,0 @@
1
- Config goes in config/tcell_agent.config
2
- Fill in API key, Company Name, App Name
3
-
4
- You can add
5
- "tcell_api_url":"http://10.0.2.2:8000/api/v1",
6
- "tcell_input_url":"http://10.0.2.2:3000"
7
- to specify other servers to use