-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
Exceptions no longer reported after 5.3.1 -> 5.4.1 upgrade #1859
Comments
I tried to produce the error with these initializers OpenTelemetry::SDK.configure do |c|
c.use "OpenTelemetry::Instrumentation::ActiveSupport"
c.use "OpenTelemetry::Instrumentation::ActionPack"
c.use "OpenTelemetry::Instrumentation::ActiveJob"
c.use "OpenTelemetry::Instrumentation::ActiveRecord"
c.use "OpenTelemetry::Instrumentation::ActionView"
c.use "OpenTelemetry::Instrumentation::ConcurrentRuby"
c.use "OpenTelemetry::Instrumentation::Faraday"
c.use "OpenTelemetry::Instrumentation::Net::HTTP"
c.use "OpenTelemetry::Instrumentation::PG"
c.use "OpenTelemetry::Instrumentation::Rack"
c.use "OpenTelemetry::Instrumentation::Rails"
end
Sentry.init do |config|
config.dsn = 'https://2fb45f003d054a7ea47feb45898f7649@o447951.ingest.sentry.io/5434472'
config.breadcrumbs_logger = [:active_support_logger, :http_logger]
config.environment = Rails.env
end
tenant = ENV.fetch("TENANT", "unknown")
Sentry.set_tags(tenant: tenant)
Sentry.set_context("tenant", {tenant: tenant}) And these dependencies
And I still received events from a similar database error (don't have PG): So it'll be great if you can
|
Thanks for investigating! I've set On On I've removed opentelemetry to make sure it's not a contributing factor here, and the test output is the same as described above. Full stacktrace of an error that "works" in
I'll see if I can get a sample app up that experiences this. |
Easier than expected, here you go! https://github.com/ckdake/test-sentry-upgrade. |
I found the cause: you should use While
Can you make sure you have both |
That looks like it does the trick! This upgrade was triggered by dependabot and we missed the sentry-rails piece somehow. Should sentry-ruby have a hard dependency on version of sentry-rails it needs? |
|
Ah right, plenty of ruby solo out there! Thanks for investigating, glad we figured it out. |
This commit bumps all three Sentry gems used by this project to version 5.4.1. An internal API change was made in the Sentry gems which means 5.3.x gems aren't compatible with 5.4.x gems. If all three gems aren't updated at the same time, we end up with test failures containing error messages like this: ``` exception expected, not Class: <ArgumentError> Message: <"wrong number of arguments (given 1, expected 2)"> ``` For further details, see getsentry/sentry-ruby#1859 and getsentry/sentry-ruby#1865.
This commit bumps all three Sentry gems used by this project to version 5.4.1. An internal API change was made in the Sentry gems which means 5.3.x gems aren't compatible with 5.4.x gems. If all three gems aren't updated at the same time, we end up with test failures containing error messages like this: ``` exception expected, not Class: <ArgumentError> Message: <"wrong number of arguments (given 1, expected 2)"> ``` For further details, see getsentry/sentry-ruby#1859 and getsentry/sentry-ruby#1865.
This commit bumps all three Sentry gems used by this project to version 5.4.1. An internal API change was made in the Sentry gems which means 5.3.x gems aren't compatible with 5.4.x gems. If all three gems aren't updated at the same time, we end up with test failures containing error messages like this: ``` exception expected, not Class: <ArgumentError> Message: <"wrong number of arguments (given 1, expected 2)"> ``` For further details, see getsentry/sentry-ruby#1859 and getsentry/sentry-ruby#1865.
This is required for compatibility with the other sentry dependency bumps. See: getsentry/sentry-ruby#1859
This is required for compatibility with the other sentry dependency bumps. See: getsentry/sentry-ruby#1859
👍 thank you for the investigation and solution. |
Issue Description
Hello! We updated a production rails app from sentry-ruby 5.3.1 to 5.4.1 and noticed that some exceptions stopped being reported to sentry.
Our sentry.rb initializer:
We are also instrumented with opentelemetry (opentelemetry-api (1.0.2), opentelemetry-instrumentation-active_record (0.4.0), opentelemetry-instrumentation-rack (0.21.0))
Our opentelemetry.rb initializer:
I suspect that this may be somehow related to the changes for:
#1847
Things that worked both with 5.3.1 and 5.4.1
Both of these resulted in errors in the logs, as well as errors getting pushed to sentry.
and an error from
rake db:setup
:Things that only worked with 5.3.1 and do not work with 5.4.1
from within the rails app, this error would appear in the logs but not get pushed to sentry.
Reproduction Steps
You can reproduce this issue in a new scaffolded rails app with opentelemetry and sentry with the two above initializers.
Expected Behavior
PG::UndefinedColumn: ERROR
surfaces in the Sentry UIActual Behavior
PG::UndefinedColumn: ERROR
does not surface in the Sentry UIRuby Version
3.1.2
SDK Version
3.4.1
Integration and Its Version
Rails 7.0.3
Sentry Config
The text was updated successfully, but these errors were encountered: