oneapm_rpm 1.3.4 → 1.3.5.rc1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWFmMDAxNzQ4ZTFhMGRhNDk5Y2ViZjViODM2NzE3NWFmNzRjYTAwNA==
4
+ NTMzMTkyOWI5YTM1ZTAzZWQ4YjQ1Njk0YmNmZjlkNjdiMGRlMGNlOQ==
5
5
  data.tar.gz: !binary |-
6
- YjAzYjdkODQxMTkyMjMyZDVjNGUyOGExZTAzNDc1N2ZjYmYwYjJlZg==
6
+ ZDdhMTBiMmE4YjA5Y2VjMTUxNDQ4ODY2ZDFjYTU3MTcxOTlhYzhmOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzljMjJlOGJkMWJkMWU1OWMxNTBkNWRjMjI3ODBhYWM1YzYzNGEzN2FiZGU0
10
- ZDkxMTFmYjU5MzFiNmE4OTllNzRjMzczMzA3MDg1N2VkM2RhMmQ0MjNkZjdm
11
- YzFkZTJiM2QwZjE4ZWRhNWFlMmEyMTUwZWRlZGYxZDIyMTAzYzU=
9
+ NGQwN2U5MmQyNzE2MmI1MzBmNjEyZGE0NGI3OTIzN2M4ODljMDU0MjJiNTg2
10
+ MmU3NzhkZDI2ZDM0OTJmODE1NTk0MzJhNzcxM2RkOTRkMGU0NDk5ZDBlMTMx
11
+ Yzk4Nzg2MzAzOWYwMjI4NDMzYjY5OGQzNmM4ODZmNjhlNjQ2MmE=
12
12
  data.tar.gz: !binary |-
13
- OTgxZWZmYzM4OGMyOGZlNWZmZjIxMGZkZDI1MmRjOGQxM2ZhYjJjODczYjFl
14
- OWQ0NTA5MDE0ZjFlN2MyYTBmMWM1MmRhZWM1YmQxNDI5OTMzMjI5ZjNjODY1
15
- ZDcwYmJkZmU1NTE2NzYzZTEzZWM3MzM0M2IwMTE1NTU4OWMyNWQ=
13
+ ZGQwMGY3OWQ4NDY0NjE0NTE5YjFkNzMwMjA3M2NiZThiZjA3YmQ5NzYwMmI2
14
+ YzE1MTFiY2ZiNjk3ZWI1YmZiNGUwYTFhMTI2MTM1M2Q0MWE5NDMxZTkyMWIw
15
+ ZWZiNzQwYTk5MTFhYzFiOTRhOTkwYzlhOGQzMDAzMjA1NGU3NGE=
@@ -18,7 +18,7 @@ module OneApm
18
18
  end
19
19
  serialize_finish_ts = Time.now
20
20
 
21
- data, encoding = compress_request_if_needed(data)
21
+ data, encoding = compress_request(data)
22
22
  size = data.size
23
23
 
24
24
  uri = remote_method_uri(method, @marshaller.format)
@@ -61,8 +61,8 @@ module OneApm
61
61
  def send_request(opts)
62
62
  request = Net::HTTP::Post.new(opts[:uri], 'CONTENT-ENCODING' => opts[:encoding], 'HOST' => opts[:collector].name)
63
63
  request['user-agent'] = user_agent
64
- request.content_type = "application/octet-stream"
65
64
  request.body = opts[:data]
65
+ request.content_type = "multipart/form-data; boundary=-oneapm-#{request.object_id}-"
66
66
 
67
67
  response = nil
68
68
  attempts = 0
@@ -84,7 +84,6 @@ module OneApm
84
84
  raise ServerConnectionException, "Recoverable error talking to #{@collector} after #{attempts} attempts: #{e}"
85
85
  end
86
86
  end
87
-
88
87
  log_and_return_response response
89
88
  end
90
89
 
@@ -214,15 +213,10 @@ module OneApm
214
213
  end
215
214
  end
216
215
 
217
- # We do not compress if content is smaller than 64kb. There are
218
- # problems with bugs in Ruby in some versions that expose us
219
- # to a risk of segfaults if we compress aggressively.
220
- def compress_request_if_needed(data)
221
- encoding = 'identity'
222
- if data.size > 64 * 1024
223
- data = OneApm::Support::Encoders::Compressed.encode(data)
224
- encoding = 'deflate'
225
- end
216
+ # Compress request data
217
+ def compress_request(data)
218
+ encoding = 'deflate'
219
+ data = OneApm::Support::Encoders::Compressed.encode(data)
226
220
  check_post_size(data)
227
221
  [data, encoding]
228
222
  end
@@ -54,7 +54,7 @@ module OneApm
54
54
  @collector = server_from_host(host)
55
55
  end
56
56
  response = invoke_remote(:connect, [settings])
57
- @agent_id = response['agent_run_id']
57
+ @agent_id = response['agent_run_id'] if response
58
58
  response
59
59
  end
60
60
 
@@ -5,10 +5,10 @@ module OneApm
5
5
 
6
6
  MAJOR = 1
7
7
  MINOR = 3
8
- TINY = 4
9
-
8
+ TINY = 5
9
+ TAG = 'rc1'
10
10
 
11
- STRING = [MAJOR, MINOR, TINY].compact.join('.')
11
+ STRING = [MAJOR, MINOR, TINY, TAG].compact.join('.')
12
12
 
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneapm_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - oneapm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-04 00:00:00.000000000 Z
11
+ date: 2016-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake