Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FND-3427] Sync upstream #2

Open
wants to merge 99 commits into
base: master
Choose a base branch
from
Open

[FND-3427] Sync upstream #2

wants to merge 99 commits into from

Conversation

cuchi
Copy link
Member

@cuchi cuchi commented Dec 17, 2024

This solves some deprecations in our org. such as the upload-artifact usage.

Of course, it doesn't hurt to keep it fresh.

st0012 and others added 30 commits July 2, 2024 12:52
…one (#2335)

* Bump sqlite3 to 1.7.* series for Ruby 3.3

* Avoid using Gem::Specification to determine Sentry gems' paths

This will break users with bundler standalone setup.

* Update changelog
Also fix sqlite3 delayed_job CI
* Use Concurrent.usable_processor_count when it is available

It's a new API introduced in concurrent-ruby 1.3.1, which works better
in the container environment.

ruby-concurrency/concurrent-ruby#1038

Since there are gems like sorbet-runtime that still use older versions
of concurrent-ruby, we can't directly bump concurrent-ruby's requirement,
but need to check if the method is available before calling it.

* Update changelog
* Make links in `sentry-rails` gemspec more accurate

1. Add subdir with the gem.
2. Add specific version.

* Tranform gemspec metadata to a single Hash for `sentry-rails`

* Add bug tracker and documentation links into `sentry-rails` gemspec

* Make the same URI changes for `sentry-ruby` gemspec

* Make the same URI changes for `sentry-sidekiq` gemspec

* Make the same URI changes for `sentry-rescue` gemspec

* Make the same URI changes for `sentry-opentelemetry` gemspec

* Make the same URI changes for `sentry-delayed_job` gemspec

* fix changelogs

---------

Co-authored-by: Neel Shah <[email protected]>
* Suppress the unnecessary “unsupported options notice”

In `Scope#update_from_options()`, the method strips key-value pairs from
the `options` according to its parameters. When all keys in `options` are
supported, it still logs an “unsupported options notice” for an empty
`unsupported_option_keys` value with empty array literal in
`Sentry::Hub#capture_event`, like:
"Options [] are not supported and will not be applied to the event."

Example:

When calling `subject.capture_event(event, level: 'DEBUG')`, the
`capture_event` method should handle the options like this:

  # In this case, options == {:level=>'DEBUG'}
  unsupported_option_keys = scope.update_from_options(**options)
  # unsupported_option_keys should be [], but the following debug log will be shown
  # like "Options [] are not supported and will not be applied to the event."
  configuration.log_debug <<~MSG
    Options #{unsupported_option_keys} are not supported and will not be applied to the event.
    You may want to set them under the `extra` option.
  MSG

This patch changes the logic to check whether `unsupported_option_keys` is
empty before logging the notice, thus suppressing unnecessary logs.

Signed-off-by: moznion <[email protected]>

* Update sentry-ruby/spec/sentry/hub_spec.rb

---------

Signed-off-by: moznion <[email protected]>
Co-authored-by: Stan Lo <[email protected]>
…#2342)

* teardown_sentry_test helper should clear global even processors too

* Update changelog

* Don't fail fast on sentry-ruby jobs
* Support for Faraday instrumentation

* Require sentry/faraday by default

* Update CHANGELOG.md

* Use prepend in Faraday patch

* Simplify inserting faraday instrumentation

* Ensure none of the spans come from faraday when net/http is used
* Unify Net::HTTP and Faraday implementations
* Fix early return in Faraday when Sentry is not initialized
* Include Sentry meta tag in the layout automatically
* Add --inject-meta option
* Fix rubocop setup (for some envs)

This makes it possible to use rubocop when working from inside a subdir.
It also fixes running rubocop from the root where it would actually use
the config that we have. Previously it would ignore it for some reason,
symlinking did the trick.

The rubocop-packaging was needed because something somewhere tries to
require it.

* [sentry-opentelemetry] rubocop -a --only Style/StringLiterals

* [sentry-rails] rubocop -a --only Style/StringLiterals

* [sentry-resque] rubocop -a --only Style/StringLiterals

* [sentry-sidekiq] rubocop -a --only Style/StringLiterals
sl0thentr0py and others added 25 commits October 22, 2024 17:27
The change in #1793 accidentally exposed params always in the controller action span.
This change now respects both `Rails.config.filter_parameters` and `Sentry.coniguration.send_default_pii`
together to decide what to send.
* Simplify ActiveJob specs setup

We don't need to use Sidekiq for ActiveJob specs, we can use Rails' default
adapters instead.

* Update sentry-rails' Gemfile conditions to support Rails 7.2

* Test against Rails 8.0 on CI

* Update Rails 8 related tests
Previously, it could happen that `Sentry.configuration` was `nil`.
In this case, calling `rails` would produce a `NoMethodError`.
We fix this issue by using safe navigation.

Furthermore, this commit ensures we use a reasonable default
in case the configuration couldn't be loaded. Since the config
`report_rescued_exceptions` defaults to `true`, we assume
this value here, too.

Fixes #2386
* Add childspan for Sidekiq Queue instrumentation

* Add basic specs

* Remove unneeded exception alloc

* Add CHANGELOG entry

* Set root op instead of nested spans

* Adjust feedback

* Remove timecop_delay from options hash

* Fix 1 day

* Fix 1.day

* Dont use .day helper
* [delayed_job] pin activerecord-jdbcmysql-adapter to a specific sha for now

They bumped it to 9.1.0 and we need < 9

jruby/activerecord-jdbc-adapter@0a959b8

* [delayed_job] update sqlite for older rubies

this fixes the spec suite

* [sidekiq] fix specs
* [rails] support string errors in error reporter

* Update CHANGELOG

* [rails] log instead of raising when ErrorSubscriber fails

* [rails] fix spec
* Add Excon instrumentation

* Add missing specs

* Add CHANGELOG

* Fix Rubocop

* Fix spec support for Ruby < 3

* Update sentry-ruby/lib/sentry/excon/middleware.rb

Co-authored-by: Peter Solnica <[email protected]>

* Handle case for Excon 1+ with Hash as query

* Borrow Rack::Utils for building nested query

* Add one more specs for more advanced query building in Excon

* Fixes changelog

* Add new specs using the query parameter encoding

---------

Co-authored-by: Peter Solnica <[email protected]>
* Clear Rails' default backtrace filters from Sentry's backtrace cleaner

In Rails 7.2, Rails's backtrace cleaner, which sentry-rails' backtrace
cleaner inherits from, starts shortening gem's paths in backtraces. This
will prevent sentry-ruby's `Sentry::Backtrace` from handling them correctly,
which will result in issues like #2472.

This commit avoids the issue by clearing the default filters that
Sentry's backtrace cleaner inherits.

* Remove premature path-removal filter

This filter removes the project root part from the stacktrace, which prevents
sentry-ruby from retaining the correct absolute path of it.
@cuchi cuchi changed the title Sync upstream [FND-3427] Sync upstream Dec 17, 2024
krzysztofjablonski and others added 4 commits December 19, 2024 08:23
…#2471)

* Update monitor_check_ins.rb
* Update CHANGELOG.md

---------

Co-authored-by: Peter Solnica <[email protected]>
* Default to internal_error rather than unknown_error

* Add tests for SpanProcessor#update_span_status

* Update CHANGELOG

* Update CHANGELOG.md

---------

Co-authored-by: Peter Solnica <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.