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

Sentry Jets not working #3

Open
itsmegrave opened this issue Nov 1, 2023 · 0 comments
Open

Sentry Jets not working #3

itsmegrave opened this issue Nov 1, 2023 · 0 comments

Comments

@itsmegrave
Copy link

I'm creating an API with jets, and I'm trying to integrate with sentry.
Tried to use the default sentry gem, with initializer. Locally it worked as charm, but not when I deploy it on AWS.
Found this lib, added the SENTRY_DNS to my .env file but not happens (in local server or in AWS environment).

At the moment, I just created a fake controller to report to sentry, based on sentry documentation.

# frozen_string_literal: true

class SentryController < ApplicationController
  def index
    begin
      1 / 0
    rescue ZeroDivisionError => e
      Sentry.capture_exception(e)
    end

    Sentry.capture_message('test message')
    render json: {}, status: :bad_request
  end
end

My gemfile:

# frozen_string_literal: true

source 'https://rubygems.org'

gem 'jets', '~> 4.0.0'

gem 'dynomite'

gem 'faraday'
gem 'opentelemetry-sdk'
gem 'sentry-jets', '~> 0.4.2'
gem 'zeitwerk', '>= 2.5.0'

gem 'opentelemetry-exporter-otlp'
gem 'opentelemetry-instrumentation-active_support'
gem 'opentelemetry-instrumentation-aws_sdk'
gem 'opentelemetry-instrumentation-concurrent_ruby'
gem 'opentelemetry-instrumentation-faraday'
gem 'opentelemetry-instrumentation-net_http'
gem 'opentelemetry-instrumentation-rack'
gem 'opentelemetry-instrumentation-rake'

# development and test groups are not bundled as part of the deployment
group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: %i[mri mingw x64_mingw]
  gem 'puma'
  gem 'rack'
  gem 'shotgun'

  gem 'rubocop', require: false
  gem 'rubocop-rspec', require: false
end

group :test do
  gem 'launchy'
  gem 'rspec'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant