tpt-rails 1.2.2 → 1.3.0

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: f8733558ff2cb637dcfad03bf25c7d163036d4c9ac4d64c2e05c5ef93139ff7f
4
- data.tar.gz: f59d430089151aa70537970d28beb6bc012a3beb7261555d5574a28d67a6c736
3
+ metadata.gz: '069473918c000e049099c5538f36b2e10211e16f4cbfa4adfb2e3f31066b3550'
4
+ data.tar.gz: 1bb6905ec5f83c4e10292550999e70babf5139437878709779935557d4b335ad
5
5
  SHA512:
6
- metadata.gz: d8b0a500aebf850ceaa2ad916516a5e89814319ab667f96ace1c8b5b7a1d85dc391428491c1e9f498bb4bf6ea24e41440b2130cce57b53e07d7c46ee68e248d3
7
- data.tar.gz: 7255dd10a5ea9b263f1a977499a6b7e419a85cf1e993c229546c57f51c5adda9f6977fb20620560891b77526e19777551c873cabeb2dfcb4c8d78380c79bc8e9
6
+ metadata.gz: f7a28b2dae2af0cd5e5904532c1706ab2b3866c061c9fcae39008e3efee9f163132443597a4e35b524a2720cc5b57c959f43fd30e8e2b415a0d40dde383c4075
7
+ data.tar.gz: ea76d2ca17491bd1e63e19c84913487beabb367c6e7a3a16c8ff3064d50533749c349ed915fd6b406fc979a8f0ac2d4748eb2e46aaf9ea31717b558c14c8277a
data/README.md CHANGED
@@ -117,7 +117,7 @@ Note: this currently only collects metrics when running Puma in _clustered_ mode
117
117
  ### Running tests
118
118
 
119
119
  1. Start `docker-compose up` (provides a real Redis instance for tests)
120
- 2. Run `rails test`
120
+ 2. Run `bin/test`
121
121
 
122
122
  ### Using your local version of this gem in a local app
123
123
 
@@ -68,5 +68,10 @@ module Tpt::Rails
68
68
  def config # :nodoc:
69
69
  configured? ? @config : raise(NotConfigured)
70
70
  end
71
+
72
+ # This should be set by the deployment tool. E.g. Jenkins: https://git.io/JJFiD
73
+ def release_version
74
+ ENV['TPT_RELEASE_VERSION'].presence
75
+ end
71
76
  end
72
77
  end
@@ -29,18 +29,23 @@ class Tpt::Rails::Internal::Datadog # :nodoc:
29
29
  url = @statsd_url || 'statsd://localhost'
30
30
  uri = URI.parse(url)
31
31
 
32
+ tags = ["env:#{Tpt::Rails.app_env}"]
33
+ tags << ["tpt_release_version:#{Tpt::Rails.release_version}"] if Tpt::Rails.release_version
34
+
32
35
  ::Datadog::Statsd.new(
33
36
  uri.host,
34
37
  uri.port || DEFAULT_STATSD_PORT,
35
38
  {
36
39
  namespace: Tpt::Rails.app_name,
37
- tags: ["env:#{Tpt::Rails.app_env}"],
40
+ tags: tags,
38
41
  }
39
42
  )
40
43
  end
41
44
 
42
45
  def configure_tracing
43
46
  uri = URI.parse(@trace_url)
47
+ tags = { 'env' => Tpt::Rails.app_env }
48
+ tags["tpt_release_version"] = Tpt::Rails.release_version if Tpt::Rails.release_version
44
49
 
45
50
  ::Datadog.configure do |c|
46
51
  # This will activate auto-instrumentation for Rails
@@ -53,7 +58,7 @@ class Tpt::Rails::Internal::Datadog # :nodoc:
53
58
  enabled: true,
54
59
  hostname: uri.host,
55
60
  port: uri.port || DEFAULT_TRACE_PORT,
56
- tags: { 'env' => Tpt::Rails.app_env },
61
+ tags: tags,
57
62
  )
58
63
  end
59
64
 
@@ -49,6 +49,7 @@ class Tpt::Rails::Internal::ErrorReporter # :nodoc:
49
49
 
50
50
  Bugsnag.configure do |config|
51
51
  config.api_key = @bugsnag_api_key
52
+ config.app_version = Tpt::Rails.release_version if Tpt::Rails.release_version
52
53
  end
53
54
  end
54
55
 
@@ -58,8 +59,10 @@ class Tpt::Rails::Internal::ErrorReporter # :nodoc:
58
59
 
59
60
  Rollbar.configure do |config|
60
61
  config.access_token = @rollbar_access_token
62
+ config.code_version = Tpt::Rails.release_version if Tpt::Rails.release_version
61
63
  config.enabled = @rollbar_enabled
62
64
  config.environment = Tpt::Rails.app_env
65
+ config.populate_empty_backtraces = true
63
66
  end
64
67
  end
65
68
  end
@@ -1,5 +1,5 @@
1
1
  module Tpt
2
2
  module Rails
3
- VERSION = '1.2.2'
3
+ VERSION = '1.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tpt-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TpT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-07 00:00:00.000000000 Z
11
+ date: 2020-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails