Skip to content

Commit

Permalink
Followup of #1701 (#1703)
Browse files Browse the repository at this point in the history
* Update changelog

* Improve Transaction#finish's tests
  • Loading branch information
st0012 authored Jan 27, 2022
1 parent b4d1b93 commit a7f7450
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

## 5.0.1

Expand Down
8 changes: 5 additions & 3 deletions sentry-ruby/spec/sentry/transaction_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
expect(event[:spans]).to be_empty
end

it "doesn't override the event's transaction attribute with the scope's" do
it "assigns the transaction's transaction name" do
subject.finish

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

it "doesn't override the event's tags attribute with the scope's" do
it "assigns the transaction's tags" do
Sentry.set_tags(name: "apple")

subject.set_tag(:foo, 'bar')

subject.finish

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

expect(event[:tags]).to eq({foo: 'bar'})
expect(event[:tags]).to eq({ foo: 'bar', name: "apple" })
end

describe "hub selection" do
Expand Down

0 comments on commit a7f7450

Please sign in to comment.