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

Use qualified error type name #213

Merged
merged 1 commit into from
Jun 3, 2024
Merged
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
10 changes: 5 additions & 5 deletions tests/test_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_set_error(spans):
assert span.status.status_code == StatusCode.ERROR
event = span.events[0]
assert event.name == "exception"
assert event.attributes["exception.type"] == "FooError"
assert event.attributes["exception.type"] == "tests.test_tracing.FooError"
assert event.attributes["exception.message"] == "Whoops!"


Expand All @@ -126,7 +126,7 @@ def test_set_error_on_span(spans):

event = parent_span.events[0]
assert event.name == "exception"
assert event.attributes["exception.type"] == "FooError"
assert event.attributes["exception.type"] == "tests.test_tracing.FooError"
assert event.attributes["exception.message"] == "Whoops!"

child_span = next(span for span in spans if span.name == "child span")
Expand All @@ -142,7 +142,7 @@ def test_send_error(spans):

event = span.events[0]
assert event.name == "exception"
assert event.attributes["exception.type"] == "FooError"
assert event.attributes["exception.type"] == "tests.test_tracing.FooError"
assert event.attributes["exception.message"] == "Whoops!"


Expand All @@ -162,7 +162,7 @@ def test_send_error_with_current_span(spans):

event = error_span.events[0]
assert event.name == "exception"
assert event.attributes["exception.type"] == "FooError"
assert event.attributes["exception.type"] == "tests.test_tracing.FooError"
assert event.attributes["exception.message"] == "Whoops!"

assert current_span.parent is None
Expand Down Expand Up @@ -193,5 +193,5 @@ def test_send_error_with_context(spans):

event = span.events[0]
assert event.name == "exception"
assert event.attributes["exception.type"] == "FooError"
assert event.attributes["exception.type"] == "tests.test_tracing.FooError"
assert event.attributes["exception.message"] == "Whoops!"
Loading