tcell_agent 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b7c816872f23014224453ddbea3a8b582ab52a2
4
- data.tar.gz: 2dcf9eff93ea31bbc2ebb51d759311769eaf3f91
3
+ metadata.gz: 74132ece6948e81f9fe0248a468cd7960d6c9110
4
+ data.tar.gz: 8e5ad2b42f058606a3f9b7c229558774ff48446c
5
5
  SHA512:
6
- metadata.gz: 5b835851060db61f226730552a94b08ea3ccd520ac9c7f67edb2cdfe60cc05f475ebbc1f8fe1ae7426f3d5c563e5ca09eb9f521c622e31a94bad58571441d036
7
- data.tar.gz: 0a9e816f3a2c6abf942c9536a8cfb0ce9c8af853f8a6f554d3c25cda43153d15322416260598833da575a150d071ac89b444b3e488821d61a90a3aeaf7c988d5
6
+ metadata.gz: 0c020e01c22b325491ada88aad0f9daf7a189d0b99c73411a4786e7be4906e5e3e22ecff6923a602299a1d4519fe1fe62e96af2a424f6060ac77ea5eb3d3e9f3
7
+ data.tar.gz: 5d38e93bdbc65afd39742f7076b58de537e33ea809b4ff0e90e41f3c086782c26930566a41ab13a1912dc4dde38ce2d9890adea9946a5ab8a8b22da322c2db33
data/bin/tcell_agent CHANGED
@@ -89,7 +89,7 @@ subcommands = {
89
89
 
90
90
  global.order!
91
91
  command = ARGV.shift
92
- if command.nil?
92
+ if command.nil? || subcommands[command].nil?
93
93
  puts global
94
94
  Kernel.exit(1)
95
95
  end
@@ -34,6 +34,10 @@ module TCellAgent
34
34
  request = Rack::Request.new(env)
35
35
  env[TCellAgent::Instrumentation::TCELL_ID].uri = request.url
36
36
  env[TCellAgent::Instrumentation::TCELL_ID].fullpath = request.fullpath
37
+ env[TCellAgent::Instrumentation::TCELL_ID].path = request.path
38
+ env[TCellAgent::Instrumentation::TCELL_ID].user_agent = request.user_agent
39
+ env[TCellAgent::Instrumentation::TCELL_ID].referrer = request.referrer
40
+ env[TCellAgent::Instrumentation::TCELL_ID].ip_address = TCellAgent::Utils::Rails.better_ip(request)
37
41
  if request.request_method
38
42
  env[TCellAgent::Instrumentation::TCELL_ID].request_method = request.request_method
39
43
  end
@@ -36,19 +36,12 @@ module TCellAgent
36
36
  end
37
37
  }
38
38
 
39
- TCellAgent::Instrumentation.safe_block("Setting hmac_session_id") {
39
+ TCellAgent::Instrumentation.safe_block("Setting hmac_session_id") do
40
40
  if request.env[TCellAgent::Instrumentation::TCELL_ID].session_id
41
41
  env[TCellAgent::Instrumentation::TCELL_ID].hmac_session_id =
42
42
  TCellAgent::SensorEvents::Util.hmac(request.env[TCellAgent::Instrumentation::TCELL_ID].session_id)
43
43
  end
44
- }
45
-
46
- TCellAgent::Instrumentation.safe_block("Setting and ip address user agent") {
47
- env[TCellAgent::Instrumentation::TCELL_ID].ip_address = TCellAgent::Utils::Rails.better_ip(request)
48
- env[TCellAgent::Instrumentation::TCELL_ID].user_agent = request.user_agent
49
- env[TCellAgent::Instrumentation::TCELL_ID].path = request.path
50
- env[TCellAgent::Instrumentation::TCELL_ID].referrer = request.referrer
51
- }
44
+ end
52
45
  end
53
46
 
54
47
  response = @app.call(env)
@@ -36,6 +36,10 @@ module TCellAgent
36
36
  meta_event.request_content_bytes_len = (request.content_length || 0).to_i
37
37
  meta_event.response_content_bytes_len = response_content_length
38
38
 
39
+ # use uri stored in tcell_context because
40
+ # rails modifies original request.url
41
+ # to always return /404 (or whatever error code
42
+ # it encountered)
39
43
  meta_event.location = tcell_context.uri
40
44
  meta_event.path = tcell_context.path
41
45
 
@@ -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.0"
4
+ VERSION = "1.1.1"
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.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-05 00:00:00.000000000 Z
11
+ date: 2018-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi