sentry-ruby 0.3.0 → 4.0.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: de5539f70eb6f49164765e4e13416bef15f8b697349f2d2e71f63ac57916f325
4
- data.tar.gz: 89121fce3fb31be7fe783599ee204ab86354f70a870ce775c79e4a33f6141e13
3
+ metadata.gz: 517bd830d9052aef4d3c9011f95e1d95f7740fae3bfdd746ece393766f637d84
4
+ data.tar.gz: 0b25ac7ffe3abf0c8b0a153681952bd36315fe406341add2e7e724632ca74d35
5
5
  SHA512:
6
- metadata.gz: ca35ae1d033f68fcebfe2c3e9e4b91fa2784a56261423a1bc5e5c7550b6304eb63963bf4273b22e924db27e1287f256e712b7e74781d866e71bae288308e13ae
7
- data.tar.gz: e5853d409d5bbbb4b60ecee8c1edc3c6de91971b39938c03a19895ce790246cc234e5441d848aaba745ccc90cc4bbd3f1df4eb3108c18ea68736dab41f2ca93f
6
+ metadata.gz: a717d3e5286400706e44f8bf1a17d6901e5fc7149efbff7f2f70758b1ac5c4f0f134f0d875a5543fa95777013aa1b0b0168f7c41fa149316bd9ced3a2f4ed48e
7
+ data.tar.gz: ad58cf9e97b482ff9b3107a677d1bc03d3429bba26052f908ce43b25635985f65525b3345afccd1488d5c94eabb0c6565b1ce16d003859da2e359f6ccbdd1eb9
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.0
4
+
5
+ - Only documents update for the official release and no API/feature changes.
6
+
3
7
  ## 0.3.0
4
8
 
5
9
  - Major API changes: [1123](https://github.com/getsentry/sentry-ruby/pull/1123)
data/README.md CHANGED
@@ -7,6 +7,8 @@
7
7
 
8
8
  # sentry-ruby, the Ruby Client for Sentry
9
9
 
10
+ **The old `sentry-raven` client has entered maintenance mode and was moved to [here](https://github.com/getsentry/sentry-ruby/tree/master/sentry-raven).**
11
+
10
12
  ---
11
13
 
12
14
 
@@ -17,7 +19,7 @@
17
19
  [![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=sentry-ruby&package-manager=bundler&version-scheme=semver)](https://dependabot.com/compatibility-score.html?dependency-name=sentry-ruby&package-manager=bundler&version-scheme=semver)
18
20
 
19
21
 
20
- [Documentation](https://docs.sentry.io/clients/ruby/) | [Bug Tracker](https://github.com/getsentry/sentry-ruby/issues) | [Forum](https://forum.sentry.io/) | IRC: irc.freenode.net, #sentry
22
+ [Documentation](https://docs.sentry.io/platforms/ruby/) | [Bug Tracker](https://github.com/getsentry/sentry-ruby/issues) | [Forum](https://forum.sentry.io/) | IRC: irc.freenode.net, #sentry
21
23
 
22
24
  The official Ruby-language client and integration layer for the [Sentry](https://github.com/getsentry/sentry) error reporting API.
23
25
 
@@ -70,17 +72,47 @@ Sentry.init do |config|
70
72
  end
71
73
  ```
72
74
 
75
+ ### Performance Monitoring
76
+
77
+ You can activate performance monitoring by enabling traces sampling:
78
+
79
+ ```ruby
80
+ Sentry.init do |config|
81
+ # set a uniform sample rate between 0.0 and 1.0
82
+ config.traces_sample_rate = 0.2
83
+
84
+ # or control sampling dynamically
85
+ config.traces_sampler = lambda do |sampling_context|
86
+ # sampling_context[:transaction_context] contains the information about the transaction
87
+ # sampling_context[:parent_sampled] contains the transaction's parent's sample decision
88
+ true # return value can be a boolean or a float between 0.0 and 1.0
89
+ end
90
+ end
91
+ ```
92
+
93
+ To lean more about performance monitoring, please visit the [official documentation](https://docs.sentry.io/platforms/ruby/performance).
94
+
73
95
  ### Usage
74
96
 
75
97
  `sentry-ruby` has a default integration with `Rack`, so you only need to use the middleware in your application like:
76
98
 
77
- ```
78
- require 'rack'
99
+ ```ruby
79
100
  require 'sentry-ruby'
80
101
 
81
- use Sentry::Rack::CaptureException
102
+ Sentry.init do |config|
103
+ config.dsn = 'https://examplePublicKey@o0.ingest.sentry.io/0'
104
+
105
+ # To activate performance monitoring, set one of these options.
106
+ # We recommend adjusting the value in production:
107
+ config.traces_sample_rate = 0.5
108
+ # or
109
+ config.traces_sampler = lambda do |context|
110
+ true
111
+ end
112
+ end
82
113
 
83
- run theapp
114
+ use Sentry::Rack::Tracing # this needs to be placed first
115
+ use Sentry::Rack::CaptureException
84
116
  ```
85
117
 
86
118
  Otherwise, Sentry you can always use the capture helpers manually
@@ -148,6 +180,16 @@ end
148
180
  Sentry.capture_exception(exception) # the event will carry all those information now
149
181
  ```
150
182
 
183
+ Or use top-level setters
184
+
185
+
186
+ ```ruby
187
+ Sentry.set_user(id: 1, email: "test@example.com")
188
+ Sentry.set_tags(tag_1: "foo", tag_2: "bar")
189
+ Sentry.set_extras(order_number: 1234, tickets_count: 4)
190
+
191
+ ```
192
+
151
193
  Or build up a temporary scope for local information:
152
194
 
153
195
  ```ruby
@@ -172,7 +214,7 @@ Sentry.capture_exception(exception, tags: {foo: "bar"})
172
214
 
173
215
  ## More Information
174
216
 
175
- * [Documentation](https://docs.sentry.io/clients/ruby/)
217
+ * [Documentation](https://docs.sentry.io/platforms/ruby/)
176
218
  * [Bug Tracker](https://github.com/getsentry/sentry-ruby/issues)
177
219
  * [Forum](https://forum.sentry.io/)
178
220
  - [Discord](https://discord.gg/ez5KZN7)
@@ -1,3 +1,3 @@
1
1
  module Sentry
2
- VERSION = "0.3.0"
2
+ VERSION = "4.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-04 00:00:00.000000000 Z
11
+ date: 2020-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday