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

Add span data to the transactions trace context #3374

Merged
merged 4 commits into from
Jul 30, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Nicer test
  • Loading branch information
antonpirker committed Jul 30, 2024
commit 31b46c4d30b54a2f1a6f82ece739e04b84a19f59
10 changes: 6 additions & 4 deletions tests/tracing/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,20 @@ def test_transaction_data(sentry_init, capture_events):
with start_span(op="test-span") as span:
span.set_data("spanfoo", "spanbar")

(transaction,) = events
span = transaction["spans"][0]

transaction = events[0]
antonpirker marked this conversation as resolved.
Show resolved Hide resolved
transaction_data = transaction["contexts"]["trace"]["data"]
span_data = span["data"]

assert "data" not in transaction.keys()
assert transaction_data == ApproxDict(
{
"foo": "bar",
}
)

span = transaction["spans"][0]
antonpirker marked this conversation as resolved.
Show resolved Hide resolved
span_data = span["data"]

assert "contexts" not in span.keys()
assert span_data == ApproxDict(
{
"spanfoo": "spanbar",
Expand Down
Loading