Skip to content

Commit e333b1d

Browse files
committed
Replace namedtuple with regular class object.
1 parent dce16c0 commit e333b1d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/test_tracing.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import collections
21
import copy
32
import functools
43
import json
@@ -1191,9 +1190,16 @@ def test_remaps_specific_inferred_span_service_names_from_eventbridge_event(
11911190
self.assertEqual(span2.get_tag("operation_name"), "aws.eventbridge")
11921191
self.assertEqual(span2.service, "eventbridge")
11931192

1194-
_Span = collections.namedtuple(
1195-
"Span", ("service", "start", "span_type", "parent_name", "tags"),
1196-
defaults=(None, {}))
1193+
1194+
class _Span(object):
1195+
def __init__(self, service, start, span_type, parent_name=None, tags=None):
1196+
self.service = service
1197+
self.start = start
1198+
self.span_type = span_type
1199+
self.parent_name = parent_name
1200+
self.tags = tags or {}
1201+
1202+
11971203
_test_create_inferred_span = (
11981204
("api-gateway", _Span(
11991205
service="70ixmpl4fl.execute-api.us-east-2.amazonaws.com",

0 commit comments

Comments
 (0)