tpt-rails 1.2.2 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/lib/generators/{tpt_rails → tpt/rails}/configuration/configuration_generator.rb +0 -0
  4. data/lib/generators/tpt/rails/configuration/templates/config/initializers/tpt_rails.rb +14 -0
  5. data/lib/generators/tpt/rails/continuous_integration/continuous_integration_generator.rb +7 -0
  6. data/lib/generators/tpt/rails/continuous_integration/templates/ci/Dockerfile.tt +42 -0
  7. data/lib/generators/{tpt_rails → tpt/rails}/continuous_integration/templates/ci/docker-compose.yaml.tt +1 -3
  8. data/lib/generators/tpt/rails/continuous_integration/templates/ci/tasks/project.test.unit.tt +22 -0
  9. data/lib/generators/{tpt_rails → tpt/rails}/kubernetes/kubernetes_generator.rb +17 -52
  10. data/lib/generators/tpt/rails/kubernetes/templates/Dockerfile.tt +56 -0
  11. data/lib/generators/tpt/rails/kubernetes/templates/entrypoint.sh +9 -0
  12. data/lib/generators/{tpt_rails → tpt/rails}/kubernetes/templates/kubernetes/helm/Chart.yaml.tt +1 -1
  13. data/lib/generators/{tpt_rails → tpt/rails}/kubernetes/templates/kubernetes/helm/README.md +6 -2
  14. data/lib/generators/tpt/rails/kubernetes/templates/kubernetes/helm/requirements.yaml.tt +9 -0
  15. data/lib/generators/{tpt_rails → tpt/rails}/kubernetes/templates/kubernetes/helm/templates/NOTES.txt.tt +0 -0
  16. data/lib/generators/{tpt_rails → tpt/rails}/kubernetes/templates/kubernetes/helm/templates/_env.yaml +0 -0
  17. data/lib/generators/{tpt_rails → tpt/rails}/kubernetes/templates/kubernetes/helm/templates/_helpers.tpl.tt +4 -0
  18. data/lib/generators/{tpt_rails → tpt/rails}/kubernetes/templates/kubernetes/helm/templates/autoscaler.yaml.tt +0 -0
  19. data/lib/generators/{tpt_rails → tpt/rails}/kubernetes/templates/kubernetes/helm/templates/deployment.yaml.tt +2 -1
  20. data/lib/generators/{tpt_rails/kubernetes/templates/kubernetes/helm/templates/hooks/db-migrate.yaml.tt → tpt/rails/kubernetes/templates/kubernetes/helm/templates/hooks/db-prepare.yaml.tt} +6 -3
  21. data/lib/generators/{tpt_rails → tpt/rails}/kubernetes/templates/kubernetes/helm/templates/service.yaml.tt +2 -0
  22. data/lib/generators/tpt/rails/kubernetes/templates/kubernetes/helm/values.prod.yaml.tt +82 -0
  23. data/lib/generators/tpt/rails/kubernetes/templates/kubernetes/helm/values.staging.yaml.tt +125 -0
  24. data/lib/generators/{tpt_rails → tpt/rails}/kubernetes/templates/kubernetes/helm/values.yaml.tt +85 -14
  25. data/lib/generators/{tpt_rails → tpt/rails}/postman/postman.yaml.tt +0 -0
  26. data/lib/tpt/rails.rb +5 -0
  27. data/lib/tpt/rails/internal/datadog.rb +10 -5
  28. data/lib/tpt/rails/internal/error_reporter.rb +3 -0
  29. data/lib/tpt/rails/version.rb +2 -1
  30. metadata +37 -42
  31. data/lib/generators/tpt_rails/configuration/templates/config/initializers/tpt_rails.rb +0 -10
  32. data/lib/generators/tpt_rails/continuous_integration/continuous_integration_generator.rb +0 -17
  33. data/lib/generators/tpt_rails/continuous_integration/templates/ci/Dockerfile.tt +0 -31
  34. data/lib/generators/tpt_rails/continuous_integration/templates/ci/tasks/project.test.unit +0 -12
  35. data/lib/generators/tpt_rails/continuous_integration/templates/ci/test.Jenkinsfile.tt +0 -40
  36. data/lib/generators/tpt_rails/continuous_integration/templates/ci/test.config.xml.tt +0 -76
  37. data/lib/generators/tpt_rails/continuous_integration/templates/ci/tptcd.Jenkinsfile.tt +0 -7
  38. data/lib/generators/tpt_rails/continuous_integration/templates/ci/tptci.Jenkinsfile.tt +0 -7
  39. data/lib/generators/tpt_rails/kubernetes/templates/Dockerfile.tt +0 -41
  40. data/lib/generators/tpt_rails/kubernetes/templates/entrypoint.sh +0 -13
  41. data/lib/generators/tpt_rails/kubernetes/templates/kubernetes/helm/requirements.yaml.tt +0 -8
  42. data/lib/generators/tpt_rails/kubernetes/templates/kubernetes/helm/values.prod.yaml.tt +0 -52
  43. data/lib/generators/tpt_rails/kubernetes/templates/kubernetes/helm/values.staging.yaml.tt +0 -52
  44. data/lib/tasks/tpt/rails_tasks.rake +0 -23
@@ -17,6 +17,8 @@ metadata:
17
17
  tpt/owner: {{ .Values.annotations.owner }}
18
18
  tpt/creator: {{ .Values.annotations.creator | default "UNKNOWN" | quote }}
19
19
  tpt/release: "{{ .Release.Name }}"
20
+ tpt/costEnv: {{ .Values.annotations.costEnv | quote }}
21
+ tpt/costCategory: {{ .Values.annotations.costCategory | quote }}
20
22
  annotations:
21
23
  getambassador.io/config: |
22
24
  apiVersion: ambassador/v1
@@ -0,0 +1,82 @@
1
+ name: <%= Tpt::Rails.app_name %>
2
+ deploy_env: production
3
+
4
+ annotations:
5
+ costEnv: production
6
+
7
+ image:
8
+ name: <%= Tpt::Rails.app_name %>
9
+ repository: teacherspayteachers/<%= Tpt::Rails.app_name %>
10
+ tag: latest
11
+ pullPolicy: Always
12
+
13
+ environment:
14
+ ENVIRONMENT: production
15
+ APP_ENV: production
16
+ RAILS_ENV: production
17
+ RACK_TIMEOUT_SERVICE_TIMEOUT: "20"
18
+ RACK_TIMEOUT_TERM_ON_TIMEOUT: "5"
19
+
20
+ # To set up a staging/prod DB:
21
+ # - Create the DB in the TpT terraform repo
22
+ # - Use the root DB account to create an application DB user
23
+ # - Add needed the following keys with proper values to
24
+ # the '<%= Tpt::Rails.app_name %>-secrets' kube secret:
25
+ # - <%= Tpt::Rails.app_name %>-prod-db-host
26
+ # - <%= Tpt::Rails.app_name %>-prod-db-replica-host
27
+ # - <%= Tpt::Rails.app_name %>-prod-db-name
28
+ # - <%= Tpt::Rails.app_name %>-prod-db-password
29
+ # - <%= Tpt::Rails.app_name %>-prod-db-user
30
+ DATABASE_HOST: |-
31
+ valueFrom:
32
+ secretKeyRef:
33
+ name: <%= Tpt::Rails.app_name %>-secrets
34
+ key: <%= Tpt::Rails.app_name %>-prod-db-host
35
+ DATABASE_REPLICA_HOST: |-
36
+ valueFrom:
37
+ secretKeyRef:
38
+ name: <%= Tpt::Rails.app_name %>-secrets
39
+ key: <%= Tpt::Rails.app_name %>-prod-db-replica-host
40
+ DATABASE_NAME: |-
41
+ valueFrom:
42
+ secretKeyRef:
43
+ name: <%= Tpt::Rails.app_name %>-secrets
44
+ key: <%= Tpt::Rails.app_name %>-prod-db-name
45
+ DATABASE_PASSWORD: |-
46
+ valueFrom:
47
+ secretKeyRef:
48
+ name: <%= Tpt::Rails.app_name %>-secrets
49
+ key: <%= Tpt::Rails.app_name %>-prod-db-password
50
+ DATABASE_USER: |-
51
+ valueFrom:
52
+ secretKeyRef:
53
+ name: <%= Tpt::Rails.app_name %>-secrets
54
+ key: <%= Tpt::Rails.app_name %>-prod-db-user
55
+
56
+ copy-secrets:
57
+ enabled: false
58
+
59
+ mysql:
60
+ enabled: false
61
+
62
+ postgresql:
63
+ enabled: false
64
+
65
+ redis:
66
+ enabled: false
67
+
68
+ autoscaler:
69
+ minimumPods: 3
70
+ maximumPods: 6
71
+ targetCPUUtilizationPercentage: 70
72
+
73
+ rollingUpdate:
74
+ maxSurge: 25%
75
+
76
+ # Create ELB
77
+ # service:
78
+ # type: LoadBalancer
79
+ # port: 80
80
+
81
+ db-migrate:
82
+ enabled: false
@@ -0,0 +1,125 @@
1
+ name: <%= Tpt::Rails.app_name %>
2
+ deploy_env: staging
3
+
4
+ annotations:
5
+ costEnv: staging
6
+
7
+ image:
8
+ name: <%= Tpt::Rails.app_name %>
9
+ repository: teacherspayteachers/<%= Tpt::Rails.app_name %>
10
+ tag: latest
11
+ pullPolicy: Always
12
+
13
+ environment:
14
+ APP_ENV: staging
15
+ ENVIRONMENT: staging
16
+ RAILS_ENV: production
17
+ RACK_TIMEOUT_SERVICE_TIMEOUT: "20"
18
+ RACK_TIMEOUT_TERM_ON_TIMEOUT: "1"
19
+
20
+ # To set up a staging/prod DB:
21
+ # - Create the DB in the TpT terraform repo
22
+ # - Use the root DB account to create an application DB user
23
+ # - Add needed the following keys with proper values to
24
+ # the '<%= Tpt::Rails.app_name %>-secrets' kube secret:
25
+ # - <%= Tpt::Rails.app_name %>-staging-db-host
26
+ # - <%= Tpt::Rails.app_name %>-staging-db-replica-host
27
+ # - <%= Tpt::Rails.app_name %>-staging-db-name
28
+ # - <%= Tpt::Rails.app_name %>-staging-db-password
29
+ # - <%= Tpt::Rails.app_name %>-staging-db-user
30
+ DATABASE_HOST: |-
31
+ valueFrom:
32
+ secretKeyRef:
33
+ name: <%= Tpt::Rails.app_name %>-secrets
34
+ key: <%= Tpt::Rails.app_name %>-staging-db-host
35
+ DATABASE_REPLICA_HOST: |-
36
+ valueFrom:
37
+ secretKeyRef:
38
+ name: <%= Tpt::Rails.app_name %>-secrets
39
+ key: <%= Tpt::Rails.app_name %>-staging-db-replica-host
40
+ DATABASE_NAME: |-
41
+ valueFrom:
42
+ secretKeyRef:
43
+ name: <%= Tpt::Rails.app_name %>-secrets
44
+ key: <%= Tpt::Rails.app_name %>-staging-db-name
45
+ DATABASE_PASSWORD: |-
46
+ valueFrom:
47
+ secretKeyRef:
48
+ name: <%= Tpt::Rails.app_name %>-secrets
49
+ key: <%= Tpt::Rails.app_name %>-staging-db-password
50
+ DATABASE_USER: |-
51
+ valueFrom:
52
+ secretKeyRef:
53
+ name: <%= Tpt::Rails.app_name %>-secrets
54
+ key: <%= Tpt::Rails.app_name %>-staging-db-user
55
+
56
+ copy-secrets:
57
+ enabled: false
58
+
59
+ mysql:
60
+ enabled: false
61
+
62
+ postgresql:
63
+ enabled: false
64
+
65
+ redis:
66
+ enabled: false
67
+
68
+ autoscaler:
69
+ minimumPods: 1
70
+ maximumPods: 2
71
+ targetCPUUtilizationPercentage: 70
72
+
73
+ rollingUpdate:
74
+ maxSurge: 25%
75
+
76
+ # Create ELB
77
+ # service:
78
+ # type: LoadBalancer
79
+ # port: 80
80
+
81
+ db-migrate:
82
+ enabled: false
83
+ migration:
84
+ env:
85
+ - name: APP_ENV
86
+ value: staging
87
+ - name: APP_NAME
88
+ value: <%= Tpt::Rails.app_name %>
89
+ # The db-migrate chart sets the following environment variables, which we can use to construct
90
+ # a Rails-friendly DB_URL.
91
+ # - PROXY_HOST
92
+ # - PROXY_PASSWORD
93
+ # - PROXY_USER
94
+ - name: DB_URL
95
+ value: "mysql2://$(PROXY_USER):$(PROXY_PASSWORD)@$(PROXY_HOST):3306/<%= Tpt::Rails.app_name %>"
96
+ # We don't override DB_MAX_EXECUTION_TIME here because it only applies to `select` queries and we
97
+ # plan to write migrations such that any `select` queries are fast.
98
+ # We specify the READ timeout because when testing that was the one that seemed to be used for
99
+ # `alter table` commands.
100
+ - name: DB_READ_TIMEOUT
101
+ value: "604800"
102
+ - name: DB_WRITE_TIMEOUT
103
+ value: "604800"
104
+ - name: RAILS_ENV
105
+ value: production
106
+ - name: SECRET_KEY_BASE
107
+ valueFrom:
108
+ secretKeyRef:
109
+ name: <%= config.fetch(:secrets_name) %>
110
+ key: <%= config.fetch(:secrets_key) %>
111
+ proxy-osc:
112
+ dryRun: false
113
+ target:
114
+ host:
115
+ secret:
116
+ name: <%= config.fetch(:secrets_name) %>
117
+ key: <%= Tpt::Rails.app_name %>-staging-db-host
118
+ user:
119
+ secret:
120
+ name: <%= config.fetch(:secrets_name) %>
121
+ key: <%= Tpt::Rails.app_name %>-staging-db-user
122
+ password:
123
+ secret:
124
+ name: <%= config.fetch(:secrets_name) %>
125
+ key: <%= Tpt::Rails.app_name %>-staging-db-password
@@ -9,19 +9,26 @@ deploy_env: integration
9
9
  # There are added to Kubernetes in various ways as labels/etc
10
10
  annotations:
11
11
  owner: <%= config.fetch(:team_name) %>
12
+ # tpt/costEnv can be [development, integration, staging, production, uncategorized]
13
+ costEnv: integration
14
+ # tpt/costCategory can be [core_domains, data, easel, infrastructure, kubernetes, marketplace, search, schools, uncategorized]
15
+ costCategory: uncategorized
12
16
 
13
17
  # Docker image configuration for the pod
14
- image:
18
+ image: &appImage
15
19
  name: <%= Tpt::Rails.app_name %>
16
- repository: <%= Tpt::Rails.app_name %>
20
+ repository: teacherspayteachers/<%= Tpt::Rails.app_name %>
17
21
  tag: latest # most recently pushed
18
22
  pullPolicy: Always # always pull, don't use a cached version
19
23
 
20
- # Used by a Helm hook that runs migration
21
- migrateCommand: 'bin/rails db:prepare'
22
-
23
- # Container count
24
- replicas: 1
24
+ # Used by a Helm hook that sets up database schema and seeds.
25
+ # We don't override DB_MAX_EXECUTION_TIME here because it only applies to `select` queries and we
26
+ # plan to write migrations such that any `select` queries are fast.
27
+ # We specify the READ timeout because when testing that was the one that seemed to be used for
28
+ # `alter table` commands.
29
+ dbPrepare:
30
+ command: "DB_READ_TIMEOUT=600 DB_WRITE_TIMEOUT=600 bin/rails db:prepare"
31
+ enabled: true
25
32
 
26
33
  revisionHistoryLimit: 5
27
34
 
@@ -38,12 +45,18 @@ rollingUpdate:
38
45
 
39
46
  mysql:
40
47
  enabled: true
48
+ imageTag: 5.7.12
41
49
  podAnnotations:
42
50
  # istio is a service mesh. the istio sidecar interferes with how other pods connect to the MySQL
43
51
  # pod.
44
52
  sidecar.istio.io/inject: "false"
45
- # mysqlRootPassword is only used in this file and is only for ODEs
46
- mysqlRootPassword: "123456"
53
+ # Leave "mysqlDatabase" commented out.
54
+ # Specifying the db name causes our mysql chart to proactively create the database. This then
55
+ # causes db:prepare to assume it needs to *run* all migrations, instead creating the db +
56
+ # bootstrapping the schema from db/schema.rb. The latter is the correct way to set up a new DB.
57
+ # mysqlDatabase: &mysqlDatabase "<%= Tpt::Rails.app_name %>"
58
+ # mysqlRootPassword is read by our ODE mysql chart
59
+ mysqlRootPassword: &mysqlRootPassword "123456"
47
60
  persistence:
48
61
  enabled: false
49
62
 
@@ -67,7 +80,7 @@ service:
67
80
  ## Configure resource requests and limits
68
81
  ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
69
82
  ##
70
- resources:
83
+ resources: &resources
71
84
  # requests is guaranteed. kubernetes will only put your pod on a node where it can guarantee these
72
85
  # amounts.
73
86
  requests: &requests
@@ -94,12 +107,13 @@ environment:
94
107
  APP_NAME: <%= Tpt::Rails.app_name %>
95
108
  APP_ENV: integration
96
109
  DD_TRACE_DEBUG: '1'
97
- # DATABASE_URL is only used in ODEs
98
- DATABASE_URL: 'mysql2://root:{{ .Values.mysql.mysqlRootPassword }}@{{ template "<%= Tpt::Rails.app_name %>.fullname" . }}-mysql:3306/<%= Tpt::Rails.app_name %>_production'
99
110
  RAILS_ENV: 'production'
100
111
  RAILS_LOG_TO_STDOUT: '1'
101
112
  RAILS_SERVE_STATIC_FILES: '1'
102
113
  CLUSTER_SELECTOR: 'app={{ template "<%= Tpt::Rails.app_name %>.fullname" . }}'
114
+ RACK_TIMEOUT_SERVICE_TIMEOUT: "20"
115
+ RACK_TIMEOUT_TERM_ON_TIMEOUT: "1"
116
+
103
117
  APP_ENV_NAME: |-
104
118
  valueFrom:
105
119
  fieldRef:
@@ -116,12 +130,24 @@ environment:
116
130
  valueFrom:
117
131
  fieldRef:
118
132
  fieldPath: status.podIP
133
+
134
+ DATABASE_HOST: '{{ template "<%= Tpt::Rails.app_name %>.fullname" . }}-mysql'
135
+ DATABASE_REPLICA_HOST: '$(DATABASE_HOST)'
136
+ DATABASE_NAME: '<%= Tpt::Rails.app_name %>'
137
+ DATABASE_PASSWORD: *mysqlRootPassword
138
+ DATABASE_USER: root
139
+ # Using "DB" prefix here because kube env vars can only reference other env vars that come before
140
+ # them alphabetically.
141
+ DB_URL: "mysql2://$(DATABASE_USER):$(DATABASE_PASSWORD)@$(DATABASE_HOST)/$(DATABASE_NAME)"
142
+ DB_REPLICA_URL: "mysql2://$(DATABASE_USER):$(DATABASE_PASSWORD)@$(DATABASE_REPLICA_HOST)/$(DATABASE_NAME)"
143
+
119
144
  DATADOG_TRACE_HOST: |-
120
145
  valueFrom:
121
146
  fieldRef:
122
147
  fieldPath: status.hostIP
123
148
  DATADOG_TRACE_PORT: "8126"
124
149
  DATADOG_TRACE_URL: "datadog://$(DATADOG_TRACE_HOST):$(DATADOG_TRACE_PORT)"
150
+
125
151
  DOGSTATSD_HOST: |-
126
152
  valueFrom:
127
153
  fieldRef:
@@ -135,11 +161,11 @@ copy-secrets:
135
161
  - <%= config.fetch(:secrets_name) %>
136
162
 
137
163
  secrets:
138
- - name: RAILS_MASTER_KEY
164
+ - name: SECRET_KEY_BASE
139
165
  valueFrom:
140
166
  secretKeyRef:
141
167
  name: <%= config.fetch(:secrets_name) %>
142
- key: rails-master-key
168
+ key: <%= config.fetch(:secrets_key) %>
143
169
 
144
170
  # liveness: Whether the pod is up.
145
171
  # After `initialDelaySeconds` if this is failing Kube will crash+restart the pod.
@@ -170,3 +196,48 @@ autoscaler:
170
196
  minimumPods: 1
171
197
  maximumPods: 1
172
198
  targetCPUUtilizationPercentage: 70 # no effect if minimumPods == maximumPods
199
+
200
+ # Database migration support.
201
+ db-migrate:
202
+ enabled: false
203
+ migration:
204
+ command:
205
+ - bin/rails
206
+ - db:migrate
207
+ image: *appImage
208
+ env:
209
+ - name: APP_ENV
210
+ value: integration
211
+ - name: APP_NAME
212
+ value: <%= Tpt::Rails.app_name %>
213
+ # The db-migrate chart sets the following environment variables, which we can use to construct
214
+ # a Rails-friendly DB_URL.
215
+ # - PROXY_HOST
216
+ # - PROXY_PASSWORD
217
+ # - PROXY_USER
218
+ - name: DB_URL
219
+ value: "mysql2://$(PROXY_USER):$(PROXY_PASSWORD)@$(PROXY_HOST):3306/<%= Tpt::Rails.app_name %>"
220
+ # We don't override DB_MAX_EXECUTION_TIME here because it only applies to `select` queries and we
221
+ # plan to write migrations such that any `select` queries are fast.
222
+ # We specify the READ timeout because when testing that was the one that seemed to be used for
223
+ # `alter table` commands.
224
+ - name: DB_READ_TIMEOUT
225
+ value: "604800"
226
+ - name: DB_WRITE_TIMEOUT
227
+ value: "604800"
228
+ - name: RAILS_ENV
229
+ value: production
230
+ - name: SECRET_KEY_BASE
231
+ valueFrom:
232
+ secretKeyRef:
233
+ name: <%= config.fetch(:secrets_name) %>
234
+ key: <%= config.fetch(:secrets_key) %>
235
+ resources: *resources
236
+ proxy-osc:
237
+ logLevel: debug
238
+ target:
239
+ # When host is not set, proxy-osc defaults to [release-name]-mysql
240
+ # host:
241
+ user: root
242
+ password: *mysqlRootPassword
243
+ schedule: "*/1 * * * *"
data/lib/tpt/rails.rb CHANGED
@@ -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,21 @@ 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
- {
36
- namespace: Tpt::Rails.app_name,
37
- tags: ["env:#{Tpt::Rails.app_env}"],
38
- }
38
+ namespace: Tpt::Rails.app_name,
39
+ tags: tags,
39
40
  )
40
41
  end
41
42
 
42
43
  def configure_tracing
43
44
  uri = URI.parse(@trace_url)
45
+ tags = { 'env' => Tpt::Rails.app_env }
46
+ tags["tpt_release_version"] = Tpt::Rails.release_version if Tpt::Rails.release_version
44
47
 
45
48
  ::Datadog.configure do |c|
46
49
  # This will activate auto-instrumentation for Rails
@@ -53,8 +56,10 @@ class Tpt::Rails::Internal::Datadog # :nodoc:
53
56
  enabled: true,
54
57
  hostname: uri.host,
55
58
  port: uri.port || DEFAULT_TRACE_PORT,
56
- tags: { 'env' => Tpt::Rails.app_env },
59
+ tags: tags,
57
60
  )
61
+
62
+ c.logger.level = ::Logger::WARN
58
63
  end
59
64
 
60
65
  ::Datadog::Pipeline.before_flush(
@@ -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