Skip to content

Commit

Permalink
Enable client-side exception monitoring with rollbar
Browse files Browse the repository at this point in the history
We've had a report (#120) of errors uploading tracks which look like
they're being thrown from the client (likely from the direct upload
javascript). To understand a bit more about what's going on this
commit enables client side exception monitoring.

I added the post_client_item access token from our rollbar
dashboard[1] to the development and production credentials file.

It's quite likely that these exceptions will be a bit noisy, but we
can try to ignore ones we can't do anything about, or revisit having
this enabled once we get to the bottom of what's happening with the
track upload issue.

[1] https://app.rollbar.com/a/gofreerange/p/jam/settings/access_tokens
  • Loading branch information
chrislo committed Dec 29, 2023
1 parent 7d3deef commit 1ec986a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/credentials/development.yml.enc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
raRujtSsvWkLTtX4JjQRHWZgxd60EkBHc71pTct9BBJoiemzkLOOtLpmDbwxwPTLgnKXNXVu34up2ANE/Tl1zNiSgXXbgiNOumshggGoZv4BkRUfx5LTDpWFA1yBi6DaKbNyxxaNJFs33hDVxlfbF0oV3zBdr+nYh+HquSKj9y95lkJbAhU5GQQ3FERpmTUsa47J9AhOX0UWd0wXBxEhM+D2j3gdLt7M464OdiZ+Nzq5vc9srIMHvg2M8AFUXUDlDCic/ZNiVKBhudXcNnIIoqiZeFonCEjX1d9bYrwUuZvnLeuZsPsj5gU8hQxEknyW75lB/nJbZtYpX/ZGXtyMNlA92DRzSb3cao0uVV+q3bQ4ySUtPRyH7fck7foXSURjopcDhn7GtsXnazk7DHbAzWVULiQhGXXLLxtXQKDi/yFa4WfPKkIBuAdgz4vmHt/U9D4gD0zipKrU2XkaWa5bBl+VSw7UWKCBLxB3WHapTJxsJR+9M9kYizQQOIpduR1khG+rOYD1DS/hhW3/dKKCMOHZfrp4ulhnoSJ4NDoM0pdLKeR8np8GdqKqx6ZYhgklsmUFwx/Ab9CoVrB2U3H8eQMsNZLsMHbBgWj8Ql4IOOxuk7NuBe1jxr9gw6KKV5uI8C0VV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QReoYW0W1F1av/jibjop6ZXM6Mgi9nsyytVwxNmIpD1gFOyhAGHddS7djANoZMV0A7OZEiBjigRoS1huHJ8kNr209hwo5MoSTUwXmAxVX9r1ZmBNqWZatU7oCmKpojnXnP2FxPyU8o1aULyEzbF61gEwySfYoOLzysnYm7l1Bm2cPBiu5uNfR/p3rdNbAFdY7Bdu2Uju/Ryupf5ceQR63TDmBEGg4MJthUrxiGIw1z/sKRbNjEdBrOpzoP5leP4B9cdr9ooZytDwn3PBHj5lIeJdiAg9PTiR6bVrm4=--G33R0Q2jKclLIoaX--8PfMJMj8Sf0z5XpwkxuUuQ==
2 changes: 1 addition & 1 deletion config/credentials/production.yml.enc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8eRbWXbkRHkSXHOHqYWlattAF0K/IWTpAKEbjPFQjRrFvWcM34xIzcpEvix9ktnfYCa+ON8a0UJLtxinzy0Aa1RrXbE5LJMhzRM2iw3C2Wd2ZmZHUY7mVP0K/OWkjXsB4/UdwRxrYAMaCYwrVGMCSkChKweH/KBM+lSpFz6PCGkYz6xE6qBpTjWF2G3VbmqU4iI79q0o4MrA/UohP8ZZ9r/HWVMrplozPFtblrzaAtm9K1oIFT+Sboy0OOz7V/LdylN2VlIcvzn+Fnd4uyU48wh9AUg+FbBRBY/yfxjWFNDnngRsNhACt9II5XHinolV5j5ip7w4s+KC1/au5RQT+HhQVINQXlEUXKXFieLouZiRIy2wE0dSRnYWCqkPX+Uqg70+G8kWKlu/JsmTgYhCQGS+m2fyBoWWToYDecfXkc8TX9UKjVZBrstDXPefOQWGEjS56DaUTFohM0DbsuvDm2UqBzao2hTk7uUxr7gNlRETAFj3QYHUQZqKHcq6uKymEvYvZoQSC0vyq+O/TZN21iQe//zCv6oVqf5HY3JknpsEhqhGq6VJrzBY9MJ4u79zjYTm6waJuKPsjO3Ep5CDdR8PgA2mSRne6iLGVMwcPbB7lWNKNGRJHzGvbu3HuDHX64+J0Z8Jo2fR9KN4MT1cTWEyjSmwM11E5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Nfw=--WOVjw5aqyCpZTDTc--N5HzXnQ8rUxsv+JYV8fZyg==
8 changes: 8 additions & 0 deletions config/initializers/rollbar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
config.access_token = Rails.application.credentials.dig(:rollbar, :access_token)

config.enabled = Rails.env.production?
config.js_enabled = Rails.env.production?
config.js_options = {
accessToken: Rails.application.credentials.dig(:rollbar, :post_client_item_access_token),
captureUncaught: true,
payload: {
environment: Rails.env
}
}

# By default, Rollbar will try to call the `current_user` controller method
# to fetch the logged-in user object, and then call that object's `id`
Expand Down

0 comments on commit 1ec986a

Please sign in to comment.