newrelic_rpm 3.1.0.djlogging2 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of newrelic_rpm might be problematic. Click here for more details.

data/CHANGELOG CHANGED
@@ -1,7 +1,8 @@
1
1
  v3.1.0
2
- * Experimental support for aggregating data from short-running
3
- processes using NewRelic::Agent.load_data and
4
- NewRelic::Agent.save_data
2
+ * Support for aggregating data from short-running
3
+ processes to reduce reporting overhead
4
+ * Numerous bug fixes
5
+ * Increased unit test coverage
5
6
 
6
7
  v3.0.1
7
8
  * Updated Real User Monitoring to reduce javascript size and improve
@@ -13,7 +13,7 @@ The New Relic Ruby Agent runs in one of two modes:
13
13
 
14
14
  Low overhead instrumentation that captures detailed information on
15
15
  your application running in production and transmits them to
16
- rpm.newrelic.com where you can monitor them in real time.
16
+ newrelic.com where you can monitor them in real time.
17
17
 
18
18
  ==== Developer Mode
19
19
 
@@ -39,7 +39,7 @@ Environments" section under "Getting Started".
39
39
 
40
40
  = Getting Started
41
41
 
42
- Install the RPM agent as a gem. If you are using Rails you can
42
+ Install the Ruby Agent as a gem. If you are using Rails you can
43
43
  install the gem as a plug-in--details below.
44
44
 
45
45
  gem install newrelic_rpm
@@ -1,151 +1,118 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
3
- MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
4
- YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
5
- EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
6
- R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
7
- 9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpT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h
58
- /t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5
59
- IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj
60
- YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
61
- ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy
62
- OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P
63
- TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
64
- HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER
65
- dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf
66
- ReYNnyicsbkqWletNw+vHX/bvZ8=
67
- -----END CERTIFICATE-----
68
- -----BEGIN CERTIFICATE-----
69
- MIIE3jCCA8agAwIBAgICAwEwDQYJKoZIhvcNAQEFBQAwYzELMAkGA1UEBhMCVVMx
70
- ITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g
71
- RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMTYw
72
- MTU0MzdaFw0yNjExMTYwMTU0MzdaMIHKMQswCQYDVQQGEwJVUzEQMA4GA1UECBMH
73
- QXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTEaMBgGA1UEChMRR29EYWRkeS5j
74
- b20sIEluYy4xMzAxBgNVBAsTKmh0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5j
75
- b20vcmVwb3NpdG9yeTEwMC4GA1UEAxMnR28gRGFkZHk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vD117esyfxVgqwcSeIaha86ykRvOe5GPLL5CkKSkB2XIsKd83ASe8T+5o
92
- 0yGPwLPk9Qnt0hCqU7S+8MxZC9Y7lhyVJEnfzuz9p0iRFEUOOjZv2kWzRaJBydTX
93
- RE4+uXR21aITVSzGh6O1mawGhId/dQb8vxRMDsxuxN89txJx9OjxUUAiKEngHUuH
94
- qDTMBqLdElrRhjZkAzVvb3du6/KFUJheqwNTrZEjYx8WnM25sgVjOuH0aBsXBTWV
95
- U+4=
96
- -----END CERTIFICATE-----
97
- -----BEGIN CERTIFICATE-----
98
- MIIE1TCCA72gAwIBAgIEQ2DfKzANBgkqhkiG9w0BAQUFADCByjELMAkGA1UEBhMC
99
- VVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNV
100
- BAoTEUdvRGFkZHkuY29tLCBJbmMuMTMwMQYDVQQLEypodHRwOi8vY2VydGlmaWNh
101
- dGVzLmdvZGFkZHkuY29tL3JlcG9zaXRvcnkxMDAuBgNVBAMTJ0dvIERhZGR5IFNl
102
- Y3VyZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTERMA8GA1UEBRMIMDc5NjkyODcw
103
- HhcNMDkwMzE4MjEzMjI5WhcNMTEwNDMwMDIyNzExWjBVMRcwFQYDVQQKEw4qLm5l
104
- d3JlbGljLmNvbTEhMB8GA1UECxMYRG9tYWluIENvbnRyb2wgVmFsaWRhdGVkMRcw
105
- FQYDVQQDEw4qLm5ld3JlbGljLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
106
- gYEAuBCbjfFuWoIqosv2f9vofqeqZaCsKBWKs799M62BRJgatXM0sPR8T5FJAAYe
107
- /N5qX3Ei1paM9g8/VKM+w4fpKB9BceE7wwl77vFltgLz0o/IejLodcMDd9Inmt2P
108
- ax8VLkCxQup+21H3RIYRSyi4TKJeghq+MuDiYKksYZ65YnkCAwEAAaOCAbkwggG1
109
- MA8GA1UdEwEB/wQFMAMBAQAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMC
110
- MA4GA1UdDwEB/wQEAwIFoDAyBgNVHR8EKzApMCegJaAjhiFodHRwOi8vY3JsLmdv
111
- ZGFkZHkuY29tL2dkczEtMy5jcmwwUwYDVR0gBEwwSjBIBgtghkgBhv1tAQcXATA5
112
- MDcGCCsGAQUFBwIBFitodHRwOi8vY2VydGlmaWNhdGVzLmdvZGFkZHkuY29tL3Jl
113
- cG9zaXRvcnkvMIGABggrBgEFBQcBAQR0MHIwJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
114
- Y3NwLmdvZGFkZHkuY29tLzBKBggrBgEFBQcwAoY+aHR0cDovL2NlcnRpZmljYXRl
115
- cy5nb2RhZGR5LmNvbS9yZXBvc2l0b3J5L2dkX2ludGVybWVkaWF0ZS5jcnQwHwYD
116
- VR0jBBgwFoAU/axhMpNsRdbi7oVfmrrndplozOcwJwYDVR0RBCAwHoIOKi5uZXdy
117
- ZWxpYy5jb22CDG5ld3JlbGljLmNvbTAdBgNVHQ4EFgQUzLBbBJBQ6RF/UpvIuU0H
118
- C/cE9FgwDQYJKoZIhvcNAQEFBQADggEBAL4q2VVUm/0Zp08zP95dTMDOnoXd+9gX
119
- OyVhV6O4PXNdlsj7uvpZhtOCdStzIoZPEIYtvjgVfcNhyOg2T0is8u5icDG1uQgq
120
- dA/gaZ7agWtQlaDfHRHigfDiMF3lQ6by1L+C1i7P+lhEQWGISEAOGisLGW1aFlbs
121
- ZjJZIIUiej+4QSBAbKsAo72gQ9DOQdrxUCZJoQdQhkjjENg5BbRcxW99M+zykY5o
122
- HBiXHtXvgcyfZXASfgiW3nSM64QxXs9vd4gfmFNF5wnVHCSOJs5r/NRp9SIciUTq
123
- YmYKdpFyzxGxZUduYo8z1nGHmPedTxW+RvBbE+gNUtGxhauv8H+J/rc=
124
- -----END CERTIFICATE-----
125
- -----BEGIN CERTIFICATE-----
126
- MIIEmTCCA4GgAwIBAgICdPYwDQ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WNybC5nZW90
142
- cnVzdC5jb20vY3Jscy9ndHNzbC5jcmwwHQYDVR0OBBYEFIGySnbWmSQHcvbson/A
143
- hDGIuIamMAwGA1UdEwEB/wQCMAAwQwYIKwYBBQUHAQEENzA1MDMGCCsGAQUFBzAC
144
- hidodHRwOi8vZ3Rzc2wtYWlhLmdlb3RydXN0LmNvbS9ndHNzbC5jcnQwDQYJKoZI
145
- hvcNAQEFBQADggEBAHuO8i5vPkZfPhT1a9GCn49J8Ada+faVpGnZ0nE3ufqhD52d
146
- dZaVyUgft+2s+ksxIGjCwl3X+jeLfOL+dqqt77E1JRAskrCIfFHeQDS/7P6Ch3pE
147
- zm8uTkMARuRARSi+O0jwTfYH5ApRb7eumgtz8sELg94yPCAKeegrK0zqhNGF6Bnp
148
- tuSN36tUDtZb1Xy+sz6RzNpQJS/b1KH7e+jbEudctO8b6mP8/5bGoDcWQqPn4YWd
149
- UAkOShAeRtdc0jsn62VlqDEfQQ16CsmD1Hoh9Mxhwj9rSqwpDSc9f0isJ6xypDhM
150
- 4cNwyeIvhj++8Ir5LdCmWGLcUtNqUs4jK36ph7k=
151
- -----END CERTIFICATE-----
1
+ GeoTrust Global CA
2
+ ==================
3
+ -----BEGIN CERTIFICATE-----
4
+ MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
5
+ Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw
6
+ MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j
7
+ LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
8
+ CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo
9
+ BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet
10
+ 8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc
11
+ T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU
12
+ vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD
13
+ AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk
14
+ DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q
15
+ zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4
16
+ d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2
17
+ mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p
18
+ XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm
19
+ Mw==
20
+ -----END CERTIFICATE-----
21
+
22
+ GeoTrust Global CA 2
23
+ ====================
24
+ -----BEGIN CERTIFICATE-----
25
+ MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
26
+ R2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwHhcNMDQwMzA0MDUw
27
+ MDAwWhc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prn2DQKi6bA==
41
+ -----END CERTIFICATE-----
42
+
43
+ GeoTrust Universal CA
44
+ =====================
45
+ -----BEGIN CERTIFICATE-----
46
+ MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
47
+ R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1
48
+ MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu
49
+ Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
50
+ ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t
51
+ JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e
52
+ RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs
53
+ 7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d
54
+ 8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V
55
+ qnJNk22CDtucvc+081xdVHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3Cga
56
+ Rr0BHdCXteGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZf9hB
57
+ Z3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfReBi9Fi1jUIxaS5BZu
58
+ KGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+nhutxx9z3SxPGWX9f5NAEC7S8O08
59
+ ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0
60
+ XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB
61
+ hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc
62
+ aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2
63
+ qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL
64
+ oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK
65
+ xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF
66
+ KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2
67
+ DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK
68
+ xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU
69
+ p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI
70
+ P/rmMuGNG2+k5o7Y+SlIis5z/iw=
71
+ -----END CERTIFICATE-----
72
+
73
+ GeoTrust Universal CA 2
74
+ =======================
75
+ -----BEGIN CERTIFICATE-----
76
+ MI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ICATE-----
@@ -2,20 +2,15 @@ require 'new_relic/agent/instrumentation/controller_instrumentation'
2
2
 
3
3
  DependencyDetection.defer do
4
4
  depends_on do
5
- value = !NewRelic::Control.instance['disable_dj']
6
- NewRelic::Control.instance.log.info('Delayed Job instrumentation disabled, edit the "disable_dj" parameter in your newrelic.yml to change this') unless value
7
- value
5
+ !NewRelic::Control.instance['disable_dj']
8
6
  end
9
7
 
10
8
  depends_on do
11
- value = defined?(::Delayed) && defined?(::Delayed::Job)
12
- NewRelic::Control.instance.log.info('Delayed Job not defined, skipping instrumentation') unless value
13
- value
9
+ defined?(::Delayed) && defined?(::Delayed::Job)
14
10
  end
15
11
 
16
12
  executes do
17
13
  Delayed::Job.class_eval do
18
- NewRelic::Control.instance.log.info('Installing controller instrumentation into Delayed::Job')
19
14
  include NewRelic::Agent::Instrumentation::ControllerInstrumentation
20
15
  if self.instance_methods.include?('name')
21
16
  add_transaction_tracer "invoke_job", :category => 'OtherTransaction/DelayedJob', :path => '#{self.name}'
@@ -27,10 +22,8 @@ DependencyDetection.defer do
27
22
 
28
23
  executes do
29
24
  Delayed::Job.instance_eval do
30
- NewRelic::Control.instance.log.info('Attempting to install after_fork hook for Delayed Job')
31
25
  if self.respond_to?('after_fork')
32
26
  if method_defined?(:after_fork)
33
- NewRelic::Control.instance.log.info('Delayed::Job.after_fork is defined, aliasing our method and calling the old one')
34
27
  def after_fork_with_newrelic
35
28
  NewRelic::Agent.after_fork(:force_reconnect => true)
36
29
  after_fork_without_newrelic
@@ -39,7 +32,6 @@ DependencyDetection.defer do
39
32
  alias_method :after_fork_without_newrelic, :after_fork
40
33
  alias_method :after_fork, :after_fork_with_newrelic
41
34
  else
42
- NewRelic::Control.instance.log.info('Delayed::Job.after_fork is not defined, defining our after_fork hook')
43
35
  def after_fork
44
36
  NewRelic::Agent.after_fork(:force_reconnect => true)
45
37
  super
@@ -153,6 +153,12 @@ module Agent
153
153
  elapsed = (gc_time - @last_gc_timestamp).to_f
154
154
  @last_gc_timestamp = gc_time
155
155
  @last_gc_count = gc_collections
156
+
157
+ if defined?(GC::Profiler)
158
+ GC::Profiler.clear
159
+ @last_gc_timestamp = 0
160
+ end
161
+
156
162
  if num_calls > 0
157
163
  # µs to seconds
158
164
  elapsed = elapsed / 1000000.0
@@ -88,6 +88,11 @@ module NewRelic
88
88
  def multi_threaded?
89
89
  fetch('multi_threaded')
90
90
  end
91
+
92
+ def disable_serialization?
93
+ fetch('disable_serialization', false)
94
+ end
95
+
91
96
  # True if we should view files in textmate
92
97
  def use_textmate?
93
98
  fetch('textmate')
@@ -9,7 +9,7 @@ module NewRelic
9
9
  # If we try to get a log before one has been set up, return a stdout log
10
10
  unless @log
11
11
  l = Logger.new(STDOUT)
12
- l.level = Logger::DEBUG
12
+ l.level = Logger::INFO
13
13
  return l
14
14
  end
15
15
  @log
@@ -3,8 +3,12 @@ module NewRelic
3
3
  class DataSerialization
4
4
  module ClassMethods
5
5
  def should_send_data?
6
- # TODO get configuration from main control
7
- (File.size(file_path) >= max_size)
6
+ NewRelic::Control.instance.disable_serialization? || (File.size(file_path) >= max_size)
7
+ rescue Exception => e
8
+ # This is not what we really should do here, but the fail-safe
9
+ # behavior is to do what the older agent did: send data every
10
+ # time we think we might want to send data.
11
+ true
8
12
  end
9
13
 
10
14
  def read_and_write_to_file
@@ -17,8 +21,16 @@ module NewRelic
17
21
 
18
22
  private
19
23
 
24
+ def open_arguments
25
+ if defined?(Encoding)
26
+ [file_path, File::RDWR | File::CREAT, {:internal_encoding => nil}]
27
+ else
28
+ [file_path, File::RDWR | File::CREAT]
29
+ end
30
+ end
31
+
20
32
  def with_locked_store
21
- File.open(file_path, File::RDWR | File::CREAT) do |f|
33
+ File.open(*open_arguments) do |f|
22
34
  f.flock(File::LOCK_EX)
23
35
  begin
24
36
  yield(f)
@@ -27,7 +39,8 @@ module NewRelic
27
39
  end
28
40
  end
29
41
  rescue Exception => e
30
- puts e.inspect
42
+ NewRelic::Control.instance.log.error("Error serializing data to disk: #{e.inspect}")
43
+ NewRelic::Control.instance.log.debug(e.backtrace.split("\n"))
31
44
  end
32
45
 
33
46
  def get_data_from_file(f)
@@ -13,31 +13,23 @@ end
13
13
 
14
14
  DependencyDetection.defer do
15
15
  depends_on do
16
- NewRelic::Control.instance.log.info("Attempting to install Delayed Job initialization hook")
17
- value = defined?(::Delayed) && defined?(::Delayed::Worker)
18
- NewRelic::Control.instance.log.info("Delayed Job and Delayed Worker instrumentation #{value ? 'is' : 'is not'} being installed")
19
- value
16
+ defined?(::Delayed) && defined?(::Delayed::Worker)
20
17
  end
21
18
 
22
19
  executes do
23
20
  Delayed::Worker.class_eval do
24
21
  def initialize_with_new_relic(*args)
25
- NewRelic::Control.instance.log.info("Initializing Delayed Job with New Relic")
26
- value = initialize_without_new_relic(*args)
27
- NewRelic::Control.instance.log.info("Beginning New Relic Delayed Job initialization")
22
+ initialize_without_new_relic(*args)
28
23
  worker_name = case
29
24
  when self.respond_to?(:name) then self.name
30
25
  when self.class.respond_to?(:default_name) then self.class.default_name
31
26
  end
32
27
  dispatcher_instance_id = worker_name || "host:#{Socket.gethostname} pid:#{Process.pid}" rescue "pid:#{Process.pid}"
33
- log_message = "New Relic Monitoring DJ worker #{dispatcher_instance_id}"
34
- NewRelic::Control.instance.log.info(log_message)
35
- say log_message
28
+ say "New Relic Ruby Agent Monitoring DJ worker #{dispatcher_instance_id}"
36
29
  NewRelic::DelayedJobInjection.worker_name = worker_name
37
30
  NewRelic::Control.instance.init_plugin :dispatcher => :delayed_job, :dispatcher_instance_id => dispatcher_instance_id
38
31
  end
39
-
40
- NewRelic::Control.instance.log.debug("Aliasing initialize method to hook our instrumentation into Delayed::Worker#initialize")
32
+
41
33
  alias initialize_without_new_relic initialize
42
34
  alias initialize initialize_with_new_relic
43
35
  end
@@ -37,20 +37,21 @@ module NewRelic::Rack
37
37
  def autoinstrument_source(response, headers)
38
38
  source = nil
39
39
  response.each {|fragment| (source) ? (source << fragment) : (source = fragment)}
40
-
40
+ return nil unless source
41
+
41
42
  body_start = source.index("<body")
42
43
  body_close = source.rindex("</body>")
43
44
 
44
45
  if body_start && body_close
45
46
  footer = NewRelic::Agent.browser_timing_footer
46
47
  header = NewRelic::Agent.browser_timing_header
47
-
48
- head_open = source.index("<head")
49
-
50
- if head_open
51
- head_close = source.index(">", head_open)
52
-
53
- head_pos = head_close + 1
48
+
49
+ if source.include?('X-UA-Compatible')
50
+ # put at end of header if UA-Compatible meta tag found
51
+ head_pos = source.index("</head>")
52
+ elsif head_open = source.index("<head")
53
+ # put at the beginning of the header
54
+ head_pos = source.index(">", head_open) + 1
54
55
  else
55
56
  # put the header right above body start
56
57
  head_pos = body_start
@@ -4,7 +4,7 @@ module NewRelic
4
4
  MAJOR = 3
5
5
  MINOR = 1
6
6
  TINY = 0
7
- BUILD = 'djlogging2' #'0' # Set to nil for a release, 'beta1', 'alpha', etc for prerelease builds
7
+ BUILD = nil #'0' # Set to nil for a release, 'beta1', 'alpha', etc for prerelease builds
8
8
  STRING = [MAJOR, MINOR, TINY, BUILD].compact.join('.')
9
9
  end
10
10
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{newrelic_rpm}
8
- s.version = "3.1.0.djlogging2"
8
+ s.version = "3.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bill Kayser", "Justin George"]
12
- s.date = %q{2011-05-31}
12
+ s.date = %q{2011-06-15}
13
13
  s.description = %q{New Relic is a performance management system, developed by New Relic,
14
14
  Inc (http://www.newrelic.com). New Relic provides you with deep
15
15
  information about the performance of your web application as it runs
@@ -186,6 +186,7 @@ http://github.com/newrelic/rpm/
186
186
  "test/new_relic/metric_data_test.rb",
187
187
  "test/new_relic/metric_spec_test.rb",
188
188
  "test/new_relic/rack/all_test.rb",
189
+ "test/new_relic/rack/browser_monitoring_test.rb",
189
190
  "test/new_relic/rack/developer_mode_test.rb",
190
191
  "test/new_relic/stats_test.rb",
191
192
  "test/new_relic/transaction_analysis/segment_summary_test.rb",
@@ -17,15 +17,37 @@ class NewRelic::ControlTest < Test::Unit::TestCase
17
17
  assert @c.cert_file_path
18
18
  assert_equal File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'cert', 'cacert.pem')), @c.cert_file_path
19
19
  end
20
-
20
+
21
+ # This test does not actually use the ruby agent in any way - it's
22
+ # testing that the CA file we ship actually validates our server's
23
+ # certificate. It's used for customers who enable verify_certificate
21
24
  def test_cert_file
22
- result = `openssl verify -CAfile #{@c.cert_file_path} #{@c.send(:newrelic_root)}/cert/site.pem`
23
- assert (result =~ /OK/), 'Should verify certificate: ' + result
24
- end
25
-
26
- def test_old_cert_file
27
- result = `openssl verify -CAfile #{@c.cert_file_path} #{@c.send(:newrelic_root)}/cert/oldsite.pem`
28
- assert (result =~ /OK/), 'Should verify the old certificate: ' + result
25
+ require 'socket'
26
+ require 'openssl'
27
+
28
+ s = TCPSocket.new 'collector.newrelic.com', 443
29
+ ctx = OpenSSL::SSL::SSLContext.new
30
+ ctx.ca_file = @c.cert_file_path
31
+ ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER
32
+ s = OpenSSL::SSL::SSLSocket.new s, ctx
33
+ s.connect
34
+ # should not raise an error
35
+ end
36
+
37
+ # see above, but for staging, as well. This allows us to test new
38
+ # certificates in a non-customer-facing place before setting them
39
+ # live.
40
+ def test_staging_cert_file
41
+ require 'socket'
42
+ require 'openssl'
43
+
44
+ s = TCPSocket.new 'staging-collector.newrelic.com', 443
45
+ ctx = OpenSSL::SSL::SSLContext.new
46
+ ctx.ca_file = @c.cert_file_path
47
+ ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER
48
+ s = OpenSSL::SSL::SSLSocket.new s, ctx
49
+ s.connect
50
+ # should not raise an error
29
51
  end
30
52
 
31
53
  def test_monitor_mode
@@ -54,4 +54,17 @@ class NewRelic::DataSerializationTest < Test::Unit::TestCase
54
54
  end
55
55
  assert(NewRelic::DataSerialization.should_send_data?, 'Should be over limit')
56
56
  end
57
+
58
+ def test_should_send_data_disabled
59
+ NewRelic::Control.instance.expects(:disable_serialization?).returns(true)
60
+ assert(NewRelic::DataSerialization.should_send_data?, 'should send data when disabled')
61
+ end
62
+
63
+ def test_should_send_data_under_limit
64
+ NewRelic::DataSerialization.expects(:max_size).returns(50)
65
+ NewRelic::DataSerialization.read_and_write_to_file do
66
+ "a" * 5
67
+ end
68
+ assert(!NewRelic::DataSerialization.should_send_data?, 'Should be under the limit')
69
+ end
57
70
  end
@@ -0,0 +1,84 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__),'..', '..',
2
+ 'test_helper'))
3
+ require 'rack/test'
4
+ require 'new_relic/rack/browser_monitoring'
5
+
6
+ ENV['RACK_ENV'] = 'test'
7
+
8
+ class BrowserMonitoringTest < Test::Unit::TestCase
9
+ include Rack::Test::Methods
10
+
11
+ def app
12
+ @doc ||= <<-EOL
13
+ <html>
14
+ <head>
15
+ <title>im a title</title>
16
+ <meta some-crap="1"/>
17
+ <script>
18
+ junk
19
+ </script>
20
+ </head>
21
+ <body>im some body text</body>
22
+ </html>
23
+ EOL
24
+ mock_app = lambda do |env|
25
+ [200, {'Content-Type' => 'text/html'}, Rack::Response.new(@doc)]
26
+ end
27
+ NewRelic::Rack::BrowserMonitoring.new(mock_app)
28
+ end
29
+
30
+ def setup
31
+ NewRelic::Agent.stubs(:browser_timing_header) \
32
+ .returns("<script>header</script>")
33
+ NewRelic::Agent.stubs(:browser_timing_footer) \
34
+ .returns("<script>footer</script>")
35
+ end
36
+
37
+ def teardown
38
+ mocha_teardown
39
+ end
40
+
41
+ def test_should_only_instrument_successfull_html_requests
42
+ assert app.should_instrument?(200, {'Content-Type' => 'text/html'})
43
+ assert !app.should_instrument?(500, {'Content-Type' => 'text/html'})
44
+ assert !app.should_instrument?(200, {'Content-Type' => 'text/xhtml'})
45
+ end
46
+
47
+ def test_insert_timing_header_right_after_open_head_if_no_meta_tags
48
+ get '/'
49
+
50
+ assert(last_response.body.include?("head>#{NewRelic::Agent.browser_timing_header}"), last_response.body)
51
+ @doc = nil
52
+ end
53
+
54
+ def test_insert_timing_header_right_before_head_close_if_ua_compatible_found
55
+ @doc = <<-EOL
56
+ <html>
57
+ <head>
58
+ <title>im a title</title>
59
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
60
+ <script>
61
+ junk
62
+ </script>
63
+ </head>
64
+ <body>im some body text</body>
65
+ </html>
66
+ EOL
67
+ get '/'
68
+
69
+ assert(last_response.body.include?("#{NewRelic::Agent.browser_timing_header}</head>"), last_response.body)
70
+ end
71
+
72
+ def test_insert_timing_footer_right_before_html_body_close
73
+ get '/'
74
+
75
+ assert(last_response.body.include?("#{NewRelic::Agent.browser_timing_footer}</body>"), last_response.body)
76
+ end
77
+
78
+ def test_should_not_throw_exception_on_empty_reponse
79
+ @doc = ''
80
+ get '/'
81
+
82
+ assert last_response.ok?
83
+ end
84
+ end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- hash: -511226757
5
- prerelease: true
4
+ hash: 3
5
+ prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
9
  - 0
10
- - djlogging2
11
- version: 3.1.0.djlogging2
10
+ version: 3.1.0
12
11
  platform: ruby
13
12
  authors:
14
13
  - Bill Kayser
@@ -17,7 +16,7 @@ autorequire:
17
16
  bindir: bin
18
17
  cert_chain: []
19
18
 
20
- date: 2011-05-31 00:00:00 -07:00
19
+ date: 2011-06-15 00:00:00 -07:00
21
20
  default_executable:
22
21
  dependencies:
23
22
  - !ruby/object:Gem::Dependency
@@ -243,6 +242,7 @@ files:
243
242
  - test/new_relic/metric_data_test.rb
244
243
  - test/new_relic/metric_spec_test.rb
245
244
  - test/new_relic/rack/all_test.rb
245
+ - test/new_relic/rack/browser_monitoring_test.rb
246
246
  - test/new_relic/rack/developer_mode_test.rb
247
247
  - test/new_relic/stats_test.rb
248
248
  - test/new_relic/transaction_analysis/segment_summary_test.rb
@@ -390,7 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
390
390
  requirements: []
391
391
 
392
392
  rubyforge_project:
393
- rubygems_version: 1.3.7
393
+ rubygems_version: 1.4.2
394
394
  signing_key:
395
395
  specification_version: 3
396
396
  summary: New Relic Ruby Agent