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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2dfaff24a1cfbf7086523b4160e290a73940a5bab447f4eef934135eb47bd0fa
4
- data.tar.gz: 33324df0e40b95fbd2a9075f629ef8807574a39e9bd6142c04a10e488900803e
3
+ metadata.gz: fa843c61f97b720b0f89133b9806c380d0caff68dc4c7a98a3b9abedace997a0
4
+ data.tar.gz: a6e5b51687c63724663631d72bbe2cdeee90fe26903a2ba76c966dd51c5f58d6
5
5
  SHA512:
6
- metadata.gz: 702ed81b592564035bb2b6ca85fd972dc838070398f2e311c2f25f4f24129fc63c49150e44182b2343fd064945796e9119a2f1840031dd5edaa36c090f2e65ad
7
- data.tar.gz: 0ce40e5fa2a9d91ca3a32fee680e1a16baed537ee3ee2a134a5ed0dd404aa5cf706cc71281b43d6f73fefe75c3b17a6f9615893054c43bbdcb4b9f7db5c854b8
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[:adapter]
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
@@ -1,7 +1,7 @@
1
1
  module Raygun
2
2
  module Apm
3
3
  module Rails
4
- VERSION = "1.0.43"
4
+ VERSION = "1.0.56"
5
5
  end
6
6
  end
7
7
  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.43
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-11 00:00:00.000000000 Z
12
+ date: 2020-10-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: raygun-apm