Skip to content

Commit a7f7450

Browse files
authored
Followup of #1701 (#1703)
* Update changelog * Improve Transaction#finish's tests
1 parent b4d1b93 commit a7f7450

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
- Respect port info provided in user's DSN [#1702](https://github.com/getsentry/sentry-ruby/pull/1702)
44
- Fixes [#1699](https://github.com/getsentry/sentry-ruby/issues/1699)
5+
- Capture transaction tags [#1701](https://github.com/getsentry/sentry-ruby/pull/1701)
56

67
## 5.0.1
78

sentry-ruby/spec/sentry/transaction_spec.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@
338338
expect(event[:spans]).to be_empty
339339
end
340340

341-
it "doesn't override the event's transaction attribute with the scope's" do
341+
it "assigns the transaction's transaction name" do
342342
subject.finish
343343

344344
expect(events.count).to eq(1)
@@ -347,15 +347,17 @@
347347
expect(event[:transaction]).to eq("foo")
348348
end
349349

350-
it "doesn't override the event's tags attribute with the scope's" do
350+
it "assigns the transaction's tags" do
351+
Sentry.set_tags(name: "apple")
352+
351353
subject.set_tag(:foo, 'bar')
352354

353355
subject.finish
354356

355357
expect(events.count).to eq(1)
356358
event = events.last.to_hash
357359

358-
expect(event[:tags]).to eq({foo: 'bar'})
360+
expect(event[:tags]).to eq({ foo: 'bar', name: "apple" })
359361
end
360362

361363
describe "hub selection" do

0 commit comments

Comments
 (0)