sentry-ruby 0.3.0 → 4.0.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +48 -6
- data/lib/sentry/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 517bd830d9052aef4d3c9011f95e1d95f7740fae3bfdd746ece393766f637d84
|
4
|
+
data.tar.gz: 0b25ac7ffe3abf0c8b0a153681952bd36315fe406341add2e7e724632ca74d35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a717d3e5286400706e44f8bf1a17d6901e5fc7149efbff7f2f70758b1ac5c4f0f134f0d875a5543fa95777013aa1b0b0168f7c41fa149316bd9ced3a2f4ed48e
|
7
|
+
data.tar.gz: ad58cf9e97b482ff9b3107a677d1bc03d3429bba26052f908ce43b25635985f65525b3345afccd1488d5c94eabb0c6565b1ce16d003859da2e359f6ccbdd1eb9
|
data/CHANGELOG.md
CHANGED
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
|
[](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/
|
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
|
-
|
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
|
-
|
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/
|
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)
|
data/lib/sentry/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|