raygun-apm-rails 1.0.43 → 1.0.56
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/raygun/apm/rails/middleware.rb +11 -2
- data/lib/raygun/apm/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa843c61f97b720b0f89133b9806c380d0caff68dc4c7a98a3b9abedace997a0
|
4
|
+
data.tar.gz: a6e5b51687c63724663631d72bbe2cdeee90fe26903a2ba76c966dd51c5f58d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30ae06cf536f9aed5c1f830084ec857144fa5c5a8d3472e7c82ed354341805e0853c1806685b0064c34742deb6a492d2f8d1b3502e6fbcbccd4391890fa21961
|
7
|
+
data.tar.gz: 159f16c3fbd53c209ca1280af64db92bfe57fee0264a27288281decc4471d6b068e8e4937af4da42d32ee3142af09251169275f811e38e683bdd42c21107dee1
|
@@ -2,6 +2,7 @@ module Raygun
|
|
2
2
|
module Apm
|
3
3
|
module Rails
|
4
4
|
class Middleware
|
5
|
+
POSTGRESQLSTRING = "postgresql"
|
5
6
|
def initialize(app)
|
6
7
|
@app = app
|
7
8
|
@mutex = Mutex.new
|
@@ -42,8 +43,8 @@ module Raygun
|
|
42
43
|
end
|
43
44
|
# Can be nil if we had a fatal error
|
44
45
|
if @tracer
|
45
|
-
@tracer.end_trace
|
46
46
|
@tracer.diagnostics if ENV['PROTON_DIAGNOSTICS']
|
47
|
+
@tracer.end_trace
|
47
48
|
end
|
48
49
|
raise exception if exception
|
49
50
|
res
|
@@ -147,7 +148,7 @@ module Raygun
|
|
147
148
|
|
148
149
|
# XXX this is hacky
|
149
150
|
if config = connection.instance_variable_get('@config')
|
150
|
-
event[:provider] = config
|
151
|
+
event[:provider] = get_sql_provider_name(config)
|
151
152
|
event[:host] = config[:host]
|
152
153
|
event[:database] = config[:database]
|
153
154
|
end
|
@@ -162,6 +163,14 @@ module Raygun
|
|
162
163
|
raygun_shutdown_handler(e)
|
163
164
|
end
|
164
165
|
|
166
|
+
#This function adjusts the provider name for PostgreSQL to Postgres because all other Raygun profilers use Postgres and this will keep the UI consistent across supported languages
|
167
|
+
def get_sql_provider_name(config)
|
168
|
+
if config[:adapter] == POSTGRESQLSTRING
|
169
|
+
return "postgres"
|
170
|
+
end
|
171
|
+
config[:adapter]
|
172
|
+
end
|
173
|
+
|
165
174
|
def sql_event
|
166
175
|
@sql_event ||= Raygun::Apm::Event::Sql.new
|
167
176
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun-apm-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.56
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raygun
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-10-
|
12
|
+
date: 2020-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: raygun-apm
|