From 58a5035ad9b19c795c3f7e8142118238f41beee1 Mon Sep 17 00:00:00 2001 From: inventarSarah Date: Tue, 15 Sep 2026 11:36:45 +0200 Subject: [PATCH 1/3] draft Ruby quick start guide --- docs/platforms/ruby/common/index.mdx | 77 ++++++++++++--- docs/platforms/ruby/config.yml | 1 + includes/quick-start-features-expandable.mdx | 9 ++ .../quick-start-locate-data-expandable.mdx | 9 ++ .../getting-started-config/ruby.mdx | 31 ++++-- .../getting-started-config/ruby.rack.mdx | 65 +++++++----- .../getting-started-config/ruby.rails.mdx | 28 ++++-- .../getting-started-config/ruby.resque.mdx | 39 ++++++-- .../getting-started-install/ruby.mdx | 22 +++++ .../getting-started-install/ruby.rails.mdx | 22 +++++ .../getting-started-install/ruby.resque.mdx | 22 +++++ .../getting-started-install/ruby.sidekiq.mdx | 22 +++++ .../getting-started-prerequisites/ruby.mdx | 7 ++ .../getting-started-verify/ruby.mdx | 99 ++++++++++++++++++- 14 files changed, 385 insertions(+), 68 deletions(-) create mode 100644 platform-includes/getting-started-prerequisites/ruby.mdx diff --git a/docs/platforms/ruby/common/index.mdx b/docs/platforms/ruby/common/index.mdx index 4041836fad76f..9c790f779df45 100644 --- a/docs/platforms/ruby/common/index.mdx +++ b/docs/platforms/ruby/common/index.mdx @@ -2,45 +2,92 @@ -## Prerequisites + -- You need a Sentry [account](https://sentry.io/signup/) and [project](/product/projects/) -- Ruby 2.4+ or any of the most recent JRuby versions + -## Features +## Install -In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/profiling/). +Installing the Sentry SDK enables core features such as **Error Monitoring**, **Logs**, and **Application Metrics** by default. While Sentry automatically reports errors, you'll need to send logs and metrics manually. We'll show you how that works in [Verify Your Setup](#verify-your-setup). -Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. +Choose additional features you want to configure, and this guide will show you how to get set up: -## Install + + +### Install the Sentry SDK ## Configure +### Initialize the Sentry SDK Configuration should happen as early as possible in your application's lifecycle. -## Verify +### Control the Data You Send to Sentry (Optional) -This snippet includes an intentional error, so you can test that everything is working as soon as you set it up. + + + - +By default, the SDK sends user identity data (IP address, ID, and similar) and other data like HTTP bodies and URL query parameters. This will give you rich debugging context. + +The SDK always filters sensitive values whose keys match a built-in denylist, such as `auth` or `password`, and sends `[Filtered]` instead. + +To send less data, turn off the categories you don't need in the dataCollection option. For the full list of categories and their defaults, see the `dataCollection` options. + + + + +```ruby +require 'sentry-ruby' + +Sentry.init do |config| + config.dsn = '___PUBLIC_DSN___' + + config.data_collection.user_info = false + config.data_collection.http_bodies = [] + # other categories +end +``` - + + + -Learn more about manually capturing an error or message in our Usage documentation. +## Verify Your Setup - +Let's test your setup and confirm that data reaches your Sentry project. -To view and resolve the recorded error, log into [sentry.io](https://sentry.io) and select your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved. + + +### View Captured Data in Sentry + +Now, head over to your project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear). + + ## Next Steps +At this point, you should have integrated Sentry into your application and should already be sending data to your Sentry project. + +Now's a good time to customize your setup and look into more advanced topics. +Our next recommended steps for you are: + - Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup +- Continue to customize your configuration +- Learn more about manually capturing errors or messages + + + +- Find various topics in Troubleshooting +- [Get support](https://www.sentry.help/en/) + + + + diff --git a/docs/platforms/ruby/config.yml b/docs/platforms/ruby/config.yml index 3cc0256b644c6..3737757549b58 100644 --- a/docs/platforms/ruby/config.yml +++ b/docs/platforms/ruby/config.yml @@ -1,4 +1,5 @@ title: Ruby +description: Learn how to set up Sentry in your Ruby app, capture your first errors and traces, and view them in Sentry. caseStyle: snake_case supportLevel: production sdk: "sentry.ruby" diff --git a/includes/quick-start-features-expandable.mdx b/includes/quick-start-features-expandable.mdx index b901ff291b4f6..6a8f406b069a3 100644 --- a/includes/quick-start-features-expandable.mdx +++ b/includes/quick-start-features-expandable.mdx @@ -87,4 +87,13 @@ import { FeatureInfo } from "sentry-docs/components/featureInfo"; + + + + + + diff --git a/includes/quick-start-locate-data-expandable.mdx b/includes/quick-start-locate-data-expandable.mdx index 8cca720f1e168..1f42e82a4712d 100644 --- a/includes/quick-start-locate-data-expandable.mdx +++ b/includes/quick-start-locate-data-expandable.mdx @@ -87,4 +87,13 @@ import { FeatureInfo } from "sentry-docs/components/featureInfo"; + + + + + + diff --git a/platform-includes/getting-started-config/ruby.mdx b/platform-includes/getting-started-config/ruby.mdx index cc9598630f802..c813957c2481c 100644 --- a/platform-includes/getting-started-config/ruby.mdx +++ b/platform-includes/getting-started-config/ruby.mdx @@ -1,3 +1,13 @@ + + + + +Import and initialize the SDK in your app's entry point: + + + + + ```ruby require 'sentry-ruby' @@ -6,22 +16,25 @@ Sentry.init do |config| # get breadcrumbs from logs config.breadcrumbs_logger = [:sentry_logger, :http_logger] - - # To disable sending user data and HTTP bodies, uncomment the lines below. For more info visit: - # https://docs.sentry.io/platforms/ruby/configuration/options/#data_collection - # config.data_collection.user_info = false - # config.data_collection.http_bodies = [] # ___PRODUCT_OPTION_START___ performance - # enable tracing - # we recommend adjusting this value in production + # Set tracesSampleRate to 1.0 to capture 100% + # of transactions for tracing. + # We recommend adjusting this value in production + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#traces_sample_rate config.traces_sample_rate = 1.0 # ___PRODUCT_OPTION_END___ performance # ___PRODUCT_OPTION_START___ profiling - # enable profiling - # this is relative to traces_sample_rate + # Enable profiling for a percentage of sessions relative to traces_sample_rate. + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#profiles_sample_rate config.profiles_sample_rate = 1.0 # ___PRODUCT_OPTION_END___ profiling end ``` + + + + diff --git a/platform-includes/getting-started-config/ruby.rack.mdx b/platform-includes/getting-started-config/ruby.rack.mdx index 3abaf5e2bc0ba..2a2314b730da9 100644 --- a/platform-includes/getting-started-config/ruby.rack.mdx +++ b/platform-includes/getting-started-config/ruby.rack.mdx @@ -1,6 +1,13 @@ -### With Rackup +#### With Rackup -Add `use Sentry::Rack::CaptureExceptions` to your `config.ru` or other rackup file: + + + + +Import and initialize the SDK and add `use Sentry::Rack::CaptureExceptions` to your `config.ru` or other rackup file: + + + ```ruby {filename:config.ru} require 'sentry-ruby' @@ -10,21 +17,20 @@ Sentry.init do |config| # get breadcrumbs from logs config.breadcrumbs_logger = [:sentry_logger, :http_logger] - - # To disable sending user data and HTTP bodies, uncomment the lines below. For more info visit: - # https://docs.sentry.io/platforms/ruby/configuration/options/#data_collection - # config.data_collection.user_info = false - # config.data_collection.http_bodies = [] # ___PRODUCT_OPTION_START___ performance - # enable tracing - # we recommend adjusting this value in production + # Set tracesSampleRate to 1.0 to capture 100% + # of transactions for tracing. + # We recommend adjusting this value in production + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#traces_sample_rate config.traces_sample_rate = 1.0 # ___PRODUCT_OPTION_END___ performance # ___PRODUCT_OPTION_START___ profiling - # enable profiling - # this is relative to traces_sample_rate + # Enable profiling for a percentage of sessions relative to traces_sample_rate. + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#profiles_sample_rate config.profiles_sample_rate = 1.0 # ___PRODUCT_OPTION_END___ profiling end @@ -32,14 +38,20 @@ end use Sentry::Rack::CaptureExceptions ``` -### Without Rackup + + + - +#### Without Rackup -If you're not using Rackup to run your app, then Sentry initialization code **must** -be placed before your code requires Sinatra: + + + - +If you're not using Rackup to run your app, you **must** place Sentry's initialization code **before** your code requires Sinatra: + + + ```ruby {filename:app.rb} require 'sentry-ruby' @@ -49,21 +61,20 @@ Sentry.init do |config| # get breadcrumbs from logs config.breadcrumbs_logger = [:sentry_logger, :http_logger] - - # To disable sending user data and HTTP bodies, uncomment the lines below. For more info visit: - # https://docs.sentry.io/platforms/ruby/configuration/options/#data_collection - # config.data_collection.user_info = false - # config.data_collection.http_bodies = [] # ___PRODUCT_OPTION_START___ performance - # enable tracing - # we recommend adjusting this value in production + # Set tracesSampleRate to 1.0 to capture 100% + # of transactions for tracing. + # We recommend adjusting this value in production + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#traces_sample_rate config.traces_sample_rate = 1.0 # ___PRODUCT_OPTION_END___ performance # ___PRODUCT_OPTION_START___ profiling - # enable profiling - # this is relative to traces_sample_rate + # Enable profiling for a percentage of sessions relative to traces_sample_rate. + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#profiles_sample_rate config.profiles_sample_rate = 1.0 # ___PRODUCT_OPTION_END___ profiling end @@ -76,3 +87,7 @@ get "/" do raise "foo" end ``` + + + + diff --git a/platform-includes/getting-started-config/ruby.rails.mdx b/platform-includes/getting-started-config/ruby.rails.mdx index a50fe578d188a..219840ce19eb9 100644 --- a/platform-includes/getting-started-config/ruby.rails.mdx +++ b/platform-includes/getting-started-config/ruby.rails.mdx @@ -1,27 +1,37 @@ + + + + Initialize the SDK within your `config/initializers/sentry.rb`: + + + ```ruby {filename:config/initializers/sentry.rb} Sentry.init do |config| config.dsn = '___PUBLIC_DSN___' # get breadcrumbs from logs config.breadcrumbs_logger = [:active_support_logger, :http_logger] - - # To disable sending user data and HTTP bodies, uncomment the lines below. For more info visit: - # https://docs.sentry.io/platforms/ruby/configuration/options/#data_collection - # config.data_collection.user_info = false - # config.data_collection.http_bodies = [] # ___PRODUCT_OPTION_START___ performance - # enable tracing - # we recommend adjusting this value in production + # Set tracesSampleRate to 1.0 to capture 100% + # of transactions for tracing. + # We recommend adjusting this value in production + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#traces_sample_rate config.traces_sample_rate = 1.0 # ___PRODUCT_OPTION_END___ performance # ___PRODUCT_OPTION_START___ profiling - # enable profiling - # this is relative to traces_sample_rate + # Enable profiling for a percentage of sessions relative to traces_sample_rate. + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#profiles_sample_rate config.profiles_sample_rate = 1.0 # ___PRODUCT_OPTION_END___ profiling end ``` + + + + diff --git a/platform-includes/getting-started-config/ruby.resque.mdx b/platform-includes/getting-started-config/ruby.resque.mdx index 8d788e69ae750..c9d501ee74103 100644 --- a/platform-includes/getting-started-config/ruby.resque.mdx +++ b/platform-includes/getting-started-config/ruby.resque.mdx @@ -1,3 +1,12 @@ + + + + +hehe + + + + ```ruby require 'sentry-ruby' @@ -6,28 +15,40 @@ Sentry.init do |config| # get breadcrumbs from logs config.breadcrumbs_logger = [:sentry_logger, :http_logger] - - # To disable sending user data and HTTP bodies, uncomment the lines below. For more info visit: - # https://docs.sentry.io/platforms/ruby/configuration/options/#data_collection - # config.data_collection.user_info = false - # config.data_collection.http_bodies = [] # ___PRODUCT_OPTION_START___ performance - # enable tracing - # we recommend adjusting this value in production + # Set tracesSampleRate to 1.0 to capture 100% + # of transactions for tracing. + # We recommend adjusting this value in production + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#traces_sample_rate config.traces_sample_rate = 1.0 # ___PRODUCT_OPTION_END___ performance # ___PRODUCT_OPTION_START___ profiling - # enable profiling - # this is relative to traces_sample_rate + # Enable profiling for a percentage of sessions relative to traces_sample_rate. + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#profiles_sample_rate config.profiles_sample_rate = 1.0 # ___PRODUCT_OPTION_END___ profiling end ``` + + + + + + Sentry relies on the `at_exit` hook to flush all events before the process exits. To make sure none of your events are lost, additionally please set the following environment variable when you run Resque: + + + ```bash RUN_AT_EXIT_HOOKS=1 rake resque:workers ``` + + + + diff --git a/platform-includes/getting-started-install/ruby.mdx b/platform-includes/getting-started-install/ruby.mdx index 79dd8963a4e27..42bf034e7c883 100644 --- a/platform-includes/getting-started-install/ruby.mdx +++ b/platform-includes/getting-started-install/ruby.mdx @@ -1,20 +1,42 @@ + + + + Add the `sentry-ruby` gem to your `Gemfile`: + + + ```ruby {filename:Gemfile} gem "sentry-ruby" ``` + + + + + + + + Add the `sentry-ruby` and `stackprof` gems to your `Gemfile`: + + + ```ruby {filename:Gemfile} gem "stackprof" gem "sentry-ruby" ``` + + + + diff --git a/platform-includes/getting-started-install/ruby.rails.mdx b/platform-includes/getting-started-install/ruby.rails.mdx index bc33c813ae80b..f59f399243c4f 100644 --- a/platform-includes/getting-started-install/ruby.rails.mdx +++ b/platform-includes/getting-started-install/ruby.rails.mdx @@ -1,22 +1,44 @@ + + + + Add the `sentry-ruby` and `sentry-rails` gems to your `Gemfile`: + + + ```ruby {filename:Gemfile} gem "sentry-ruby" gem "sentry-rails" ``` + + + + + + + + Add the `sentry-ruby`, `sentry-rails` and `stackprof` gems to your `Gemfile`: + + + ```ruby {filename:Gemfile} gem "stackprof" gem "sentry-ruby" gem "sentry-rails" ``` + + + + diff --git a/platform-includes/getting-started-install/ruby.resque.mdx b/platform-includes/getting-started-install/ruby.resque.mdx index e9bb2337f0b42..3dc154e36dea9 100644 --- a/platform-includes/getting-started-install/ruby.resque.mdx +++ b/platform-includes/getting-started-install/ruby.resque.mdx @@ -1,22 +1,44 @@ + + + + Add the `sentry-ruby` and `sentry-resque` gems to your `Gemfile`: + + + ```ruby {filename:Gemfile} gem "sentry-ruby" gem "sentry-resque" ``` + + + + + + + + Add the `sentry-ruby`, `sentry-resque` and `stackprof` gems to your `Gemfile`: + + + ```ruby {filename:Gemfile} gem "stackprof" gem "sentry-ruby" gem "sentry-resque" ``` + + + + diff --git a/platform-includes/getting-started-install/ruby.sidekiq.mdx b/platform-includes/getting-started-install/ruby.sidekiq.mdx index 9a6741f78ee89..6c27bf187da5f 100644 --- a/platform-includes/getting-started-install/ruby.sidekiq.mdx +++ b/platform-includes/getting-started-install/ruby.sidekiq.mdx @@ -1,22 +1,44 @@ + + + + Add the `sentry-ruby` and `sentry-sidekiq` gems to your `Gemfile`: + + + ```ruby {filename:Gemfile} gem "sentry-ruby" gem "sentry-sidekiq" ``` + + + + + + + + Add the `sentry-ruby`, `sentry-sidekiq` and `stackprof` gems to your `Gemfile`: + + + ```ruby {filename:Gemfile} gem "stackprof" gem "sentry-ruby" gem "sentry-sidekiq" ``` + + + + diff --git a/platform-includes/getting-started-prerequisites/ruby.mdx b/platform-includes/getting-started-prerequisites/ruby.mdx new file mode 100644 index 0000000000000..6cb11c2d1925f --- /dev/null +++ b/platform-includes/getting-started-prerequisites/ruby.mdx @@ -0,0 +1,7 @@ +## Prerequisites + +You need: + +- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/) +- Your application up and running +- Ruby `2.4+` or any of the most recent JRuby versions diff --git a/platform-includes/getting-started-verify/ruby.mdx b/platform-includes/getting-started-verify/ruby.mdx index 2731b0e2ceb7e..b4f2b88356011 100644 --- a/platform-includes/getting-started-verify/ruby.mdx +++ b/platform-includes/getting-started-verify/ruby.mdx @@ -1,3 +1,100 @@ +### Issues + + + + + +To verify that Sentry captures errors and creates issues in your Sentry project, add this intentional error to your application: + + + + ```ruby -Sentry.capture_message("test message") + +begin + 1 / 0 +rescue ZeroDivisionError => exception + Sentry.capture_exception(exception) +end + ``` + + + + + + + +### Tracing + + + + +To test your tracing configuration, create a custom transaction and span: + + + + +```ruby + +Sentry.start_transaction(op: "task", name: "Transaction Name") do |transaction| + Sentry.get_current_scope.set_span(transaction) + + Sentry.with_child_span(description: "Custom Span Name") do |span| + # your instrumented code here + end +end + +``` + + + + + + + +### Logs + + + + +To verify that Sentry catches your logs, add some log statements to your application using the `Sentry.logger` APIs: + + + + +```ruby + +Sentry.logger.info("This is an info log message") +Sentry.logger.warning("This is a warning message") +Sentry.logger.error("This is an error message") + +``` + + + + + +### Metrics + + + + +Send test metrics from your app to verify that metrics are arriving in Sentry using the `Sentry.metrics` APIs: + + + + +```ruby + +from sentry_sdk import metrics + +Sentry.metrics.count("checkout.failed", 1) +Sentry.metrics.gauge("queue.depth", 42) +Sentry.metrics.distribution("cart.amount_usd", 187.5) + +``` + + + + From d38d87d757d45b88d85bc7b237edaf034eaf60b8 Mon Sep 17 00:00:00 2001 From: inventarSarah Date: Thu, 17 Sep 2026 10:06:34 +0200 Subject: [PATCH 2/3] logs and metrics --- docs/platforms/ruby/common/index.mdx | 19 +++++++++++++++++-- .../ruby/guides/delayed_job/config.yml | 1 + docs/platforms/ruby/guides/rack/config.yml | 1 + docs/platforms/ruby/guides/rails/config.yml | 1 + docs/platforms/ruby/guides/resque/config.yml | 1 + docs/platforms/ruby/guides/sidekiq/config.yml | 1 + includes/quick-start-features-expandable.mdx | 11 ++++++++++- .../quick-start-locate-data-expandable.mdx | 13 +++++++++++-- .../getting-started-config/ruby.mdx | 4 +++- .../getting-started-config/ruby.rack.mdx | 10 +++++++--- .../getting-started-config/ruby.rails.mdx | 4 +++- .../getting-started-config/ruby.resque.mdx | 8 +++++--- .../getting-started-install/ruby.resque.mdx | 2 +- .../getting-started-install/ruby.sidekiq.mdx | 2 +- .../getting-started-verify/ruby.mdx | 15 +++++++++++---- 15 files changed, 74 insertions(+), 19 deletions(-) diff --git a/docs/platforms/ruby/common/index.mdx b/docs/platforms/ruby/common/index.mdx index 9c790f779df45..4b063a095678b 100644 --- a/docs/platforms/ruby/common/index.mdx +++ b/docs/platforms/ruby/common/index.mdx @@ -8,7 +8,23 @@ ## Install -Installing the Sentry SDK enables core features such as **Error Monitoring**, **Logs**, and **Application Metrics** by default. While Sentry automatically reports errors, you'll need to send logs and metrics manually. We'll show you how that works in [Verify Your Setup](#verify-your-setup). + + +Installing the Sentry SDK enables core features such as **Error Monitoring**, **Logs**, and **Application Metrics** by default. We'll show you how to send logs and metrics in [Verify Your Setup](#verify-your-setup). + + + + + +Installing the Sentry SDK enables core features such as **Error Monitoring**, **Logs**, and **Application Metrics** by default. We'll show you how to send logs and metrics in [Verify Your Setup](#verify-your-setup). + + + + + +Installing the Sentry SDK enables core features such as **Error Monitoring** and **Application Metrics** by default. We'll show you how to send metrics in [Verify Your Setup](#verify-your-setup). + + Choose additional features you want to configure, and this guide will show you how to get set up: @@ -81,7 +97,6 @@ Our next recommended steps for you are: - Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup - Continue to customize your configuration -- Learn more about manually capturing errors or messages diff --git a/docs/platforms/ruby/guides/delayed_job/config.yml b/docs/platforms/ruby/guides/delayed_job/config.yml index 028fa2260a812..a88c6ec41bb61 100644 --- a/docs/platforms/ruby/guides/delayed_job/config.yml +++ b/docs/platforms/ruby/guides/delayed_job/config.yml @@ -1,2 +1,3 @@ title: DelayedJob +description: Learn how to set up Sentry in your app, capture your first errors and traces, and view them in Sentry. sdk: "sentry.ruby.delayed_job" diff --git a/docs/platforms/ruby/guides/rack/config.yml b/docs/platforms/ruby/guides/rack/config.yml index cad2d9f78f0f5..7612516886ee0 100644 --- a/docs/platforms/ruby/guides/rack/config.yml +++ b/docs/platforms/ruby/guides/rack/config.yml @@ -1 +1,2 @@ title: Rack Middleware +description: Learn how to set up Sentry in your app, capture your first errors and traces, and view them in Sentry. diff --git a/docs/platforms/ruby/guides/rails/config.yml b/docs/platforms/ruby/guides/rails/config.yml index b447f619660a9..edfab23d7008a 100644 --- a/docs/platforms/ruby/guides/rails/config.yml +++ b/docs/platforms/ruby/guides/rails/config.yml @@ -1,2 +1,3 @@ title: Rails +description: Learn how to set up Sentry in your Ruby on Rails app, capture your first errors and traces, and view them in Sentry. sdk: "sentry.ruby.rails" diff --git a/docs/platforms/ruby/guides/resque/config.yml b/docs/platforms/ruby/guides/resque/config.yml index 2c444049f1d14..06faa2330506c 100644 --- a/docs/platforms/ruby/guides/resque/config.yml +++ b/docs/platforms/ruby/guides/resque/config.yml @@ -1,2 +1,3 @@ title: Resque +description: Learn how to set up Sentry in your app, capture your first errors and traces, and view them in Sentry. sdk: "sentry.ruby.resque" diff --git a/docs/platforms/ruby/guides/sidekiq/config.yml b/docs/platforms/ruby/guides/sidekiq/config.yml index e2647220c79d7..a5c7c2fe81360 100644 --- a/docs/platforms/ruby/guides/sidekiq/config.yml +++ b/docs/platforms/ruby/guides/sidekiq/config.yml @@ -1,2 +1,3 @@ title: Sidekiq +description: Learn how to set up Sentry in your app, capture your first errors and traces, and view them in Sentry. sdk: "sentry.ruby.sidekiq" diff --git a/includes/quick-start-features-expandable.mdx b/includes/quick-start-features-expandable.mdx index 6a8f406b069a3..8ee5e2d2aef86 100644 --- a/includes/quick-start-features-expandable.mdx +++ b/includes/quick-start-features-expandable.mdx @@ -87,7 +87,7 @@ import { FeatureInfo } from "sentry-docs/components/featureInfo"; - + + + + + + + diff --git a/includes/quick-start-locate-data-expandable.mdx b/includes/quick-start-locate-data-expandable.mdx index 1f42e82a4712d..db053a6c3d22a 100644 --- a/includes/quick-start-locate-data-expandable.mdx +++ b/includes/quick-start-locate-data-expandable.mdx @@ -87,11 +87,20 @@ import { FeatureInfo } from "sentry-docs/components/featureInfo"; - + + + + + + + diff --git a/platform-includes/getting-started-config/ruby.mdx b/platform-includes/getting-started-config/ruby.mdx index c813957c2481c..3470806ca5229 100644 --- a/platform-includes/getting-started-config/ruby.mdx +++ b/platform-includes/getting-started-config/ruby.mdx @@ -14,7 +14,9 @@ require 'sentry-ruby' Sentry.init do |config| config.dsn = '___PUBLIC_DSN___' - # get breadcrumbs from logs + # Get breadcrumbs from logs + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#breadcrumbs_logger config.breadcrumbs_logger = [:sentry_logger, :http_logger] # ___PRODUCT_OPTION_START___ performance diff --git a/platform-includes/getting-started-config/ruby.rack.mdx b/platform-includes/getting-started-config/ruby.rack.mdx index 2a2314b730da9..b62dc39d6c3e4 100644 --- a/platform-includes/getting-started-config/ruby.rack.mdx +++ b/platform-includes/getting-started-config/ruby.rack.mdx @@ -15,7 +15,9 @@ require 'sentry-ruby' Sentry.init do |config| config.dsn = '___PUBLIC_DSN___' - # get breadcrumbs from logs + # Get breadcrumbs from logs + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#breadcrumbs_logger config.breadcrumbs_logger = [:sentry_logger, :http_logger] # ___PRODUCT_OPTION_START___ performance @@ -48,7 +50,7 @@ use Sentry::Rack::CaptureExceptions -If you're not using Rackup to run your app, you **must** place Sentry's initialization code **before** your code requires Sinatra: +If you're not using Rackup to run your app, you have to place Sentry's initialization code **before** your code requires Sinatra: @@ -59,7 +61,9 @@ require 'sentry-ruby' Sentry.init do |config| config.dsn = '___PUBLIC_DSN___' - # get breadcrumbs from logs + # Get breadcrumbs from logs + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#breadcrumbs_logger config.breadcrumbs_logger = [:sentry_logger, :http_logger] # ___PRODUCT_OPTION_START___ performance diff --git a/platform-includes/getting-started-config/ruby.rails.mdx b/platform-includes/getting-started-config/ruby.rails.mdx index 219840ce19eb9..8a469bb649c51 100644 --- a/platform-includes/getting-started-config/ruby.rails.mdx +++ b/platform-includes/getting-started-config/ruby.rails.mdx @@ -11,7 +11,9 @@ Initialize the SDK within your `config/initializers/sentry.rb`: Sentry.init do |config| config.dsn = '___PUBLIC_DSN___' - # get breadcrumbs from logs + # Get breadcrumbs from logs + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#breadcrumbs_logger config.breadcrumbs_logger = [:active_support_logger, :http_logger] # ___PRODUCT_OPTION_START___ performance diff --git a/platform-includes/getting-started-config/ruby.resque.mdx b/platform-includes/getting-started-config/ruby.resque.mdx index c9d501ee74103..edb95d0fe8358 100644 --- a/platform-includes/getting-started-config/ruby.resque.mdx +++ b/platform-includes/getting-started-config/ruby.resque.mdx @@ -2,7 +2,7 @@ -hehe +Import and initialize the SDK in your app's entry point: @@ -13,7 +13,9 @@ require 'sentry-ruby' Sentry.init do |config| config.dsn = '___PUBLIC_DSN___' - # get breadcrumbs from logs + # Get breadcrumbs from logs + # Learn more at + # https://docs.sentry.io/platforms/ruby/configuration/options/#breadcrumbs_logger config.breadcrumbs_logger = [:sentry_logger, :http_logger] # ___PRODUCT_OPTION_START___ performance @@ -40,7 +42,7 @@ end -Sentry relies on the `at_exit` hook to flush all events before the process exits. To make sure none of your events are lost, additionally please set the following environment variable when you run Resque: +Sentry relies on the `at_exit` hook to flush all events before the process exits. To make sure none of your events are lost, set the following environment variable when you run Resque: diff --git a/platform-includes/getting-started-install/ruby.resque.mdx b/platform-includes/getting-started-install/ruby.resque.mdx index 3dc154e36dea9..23344e1e5eeed 100644 --- a/platform-includes/getting-started-install/ruby.resque.mdx +++ b/platform-includes/getting-started-install/ruby.resque.mdx @@ -26,7 +26,7 @@ gem "sentry-resque" -Add the `sentry-ruby`, `sentry-resque` and `stackprof` gems to your `Gemfile`: +Add the `sentry-ruby`, `sentry-resque`, and `stackprof` gems to your `Gemfile`: diff --git a/platform-includes/getting-started-install/ruby.sidekiq.mdx b/platform-includes/getting-started-install/ruby.sidekiq.mdx index 6c27bf187da5f..781f0c3b0a475 100644 --- a/platform-includes/getting-started-install/ruby.sidekiq.mdx +++ b/platform-includes/getting-started-install/ruby.sidekiq.mdx @@ -26,7 +26,7 @@ gem "sentry-sidekiq" -Add the `sentry-ruby`, `sentry-sidekiq` and `stackprof` gems to your `Gemfile`: +Add the `sentry-ruby`, `sentry-sidekiq`, and `stackprof` gems to your `Gemfile`: diff --git a/platform-includes/getting-started-verify/ruby.mdx b/platform-includes/getting-started-verify/ruby.mdx index b4f2b88356011..05ff645a3b077 100644 --- a/platform-includes/getting-started-verify/ruby.mdx +++ b/platform-includes/getting-started-verify/ruby.mdx @@ -53,12 +53,15 @@ end + ### Logs -To verify that Sentry catches your logs, add some log statements to your application using the `Sentry.logger` APIs: +To verify that Sentry catches your logs, add some log statements to your application using the `Sentry.logger` APIs. + +Use Sentry's Ruby stdlib Logger integration to capture logs from all loggers that use Ruby Logger automatically. @@ -75,20 +78,24 @@ Sentry.logger.error("This is an error message") + + + + ### Metrics -Send test metrics from your app to verify that metrics are arriving in Sentry using the `Sentry.metrics` APIs: +Send test metrics from your app to verify that metrics are arriving in Sentry using the `Sentry.metrics` APIs. + +You can also send Yabeda metrics to Sentry automatically using our Yabeda integration. ```ruby -from sentry_sdk import metrics - Sentry.metrics.count("checkout.failed", 1) Sentry.metrics.gauge("queue.depth", 42) Sentry.metrics.distribution("cart.amount_usd", 187.5) From ab6cfa75ea0eadc0dc2195fbcbb73a899840c926 Mon Sep 17 00:00:00 2001 From: inventarSarah Date: Thu, 17 Sep 2026 10:26:05 +0200 Subject: [PATCH 3/3] remove duplicated content --- docs/platforms/ruby/common/index.mdx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/platforms/ruby/common/index.mdx b/docs/platforms/ruby/common/index.mdx index 4b063a095678b..95e65d46fc17b 100644 --- a/docs/platforms/ruby/common/index.mdx +++ b/docs/platforms/ruby/common/index.mdx @@ -8,13 +8,7 @@ ## Install - - -Installing the Sentry SDK enables core features such as **Error Monitoring**, **Logs**, and **Application Metrics** by default. We'll show you how to send logs and metrics in [Verify Your Setup](#verify-your-setup). - - - - + Installing the Sentry SDK enables core features such as **Error Monitoring**, **Logs**, and **Application Metrics** by default. We'll show you how to send logs and metrics in [Verify Your Setup](#verify-your-setup).