Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
### Internal

- Archive [`sentry-raven`](https://github.com/getsentry/raven-ruby) ([#2708](https://github.com/getsentry/sentry-ruby/pull/2708))
- Don't send `sample_rate` client reports for profiles if profiling is disabled ([#2728](https://github.com/getsentry/sentry-ruby/pull/2728))

## 5.28.0

Expand Down
2 changes: 1 addition & 1 deletion sentry-ruby/lib/sentry/profiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def set_initial_sample_decision(transaction_sampled)

def to_h
unless @sampled
record_lost_event(:sample_rate)
record_lost_event(:sample_rate) if @profiling_enabled
return {}
end

Expand Down
2 changes: 1 addition & 1 deletion sentry-ruby/lib/sentry/vernier/profiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def active_thread_id

def to_h
unless @sampled
record_lost_event(:sample_rate)
record_lost_event(:sample_rate) if @profiling_enabled
return EMPTY_RESULT
end

Expand Down
4 changes: 2 additions & 2 deletions sentry-ruby/spec/sentry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@

Sentry.get_current_client.flush

# 3 envelopes: log, transaction, and client_report about dropped profile
expect(sentry_envelopes.size).to be(3)
# 2 envelopes: log and transaction
expect(sentry_envelopes.size).to be(2)

log_event = sentry_logs.first

Expand Down
Loading