Skip to content

Commit

Permalink
Try to debug this shit
Browse files Browse the repository at this point in the history
  • Loading branch information
sl0thentr0py committed Apr 12, 2023
1 parent cc8a4af commit 6b206c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sentry-ruby/lib/sentry/transaction_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class TransactionEvent < Event
# @return [Hash, nil]
attr_accessor :profile

# TODO-neel remove
attr_reader :profiler

def initialize(transaction:, **options)
super(**options)

Expand All @@ -36,6 +39,8 @@ def initialize(transaction:, **options)
finished_spans = transaction.span_recorder.spans.select { |span| span.timestamp && span != transaction }
self.spans = finished_spans.map(&:to_hash)

# TODO-neel remove
@profiler = transaction.profiler
populate_profile(transaction)
end

Expand Down
4 changes: 4 additions & 0 deletions sentry-ruby/spec/sentry/rack/capture_exceptions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,10 @@ def will_be_sampled_by_sdk
stack.call(env)
event = last_sentry_event

# TODO-neel debugging
expect(defined?(StackProf)).to eq("constant")
puts("NEEL: " + event.profiler.inspect)

profile = event.profile
expect(profile).not_to be_nil

Expand Down

0 comments on commit 6b206c8

Please sign in to comment.