Skip to content

Commit

Permalink
update benchmark/write.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aMahanna committed Dec 23, 2023
1 parent 78a88de commit f3e268a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions benchmark/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@
class JaegerSpan:
def __init__(
self,
spanID: str,
operationName: str,
span_id: str,
operation_name: str,
start_time: int,
duration: int,
tags: list[dict[str, str]],
):
self.span_id = spanID
self.operation_name = operationName
self.span_id = span_id
self.operation_name = operation_name
self.start_time = start_time
self.duration = duration
self.tags = {
tag["key"]: tag["value"]
Expand All @@ -65,6 +67,7 @@ def to_dict(self) -> dict[str, Any]:
return {
"spanID": self.span_id,
"operationName": self.operation_name,
"startTime": self.start_time,
"duration": self.duration,
"tags": self.tags,
"children": [child.to_dict() for child in self.children.values()],
Expand Down Expand Up @@ -110,6 +113,7 @@ def __build_span_tree(self) -> None:
span_object = JaegerSpan(
span_id,
operation_name,
span["startTime"],
span["duration"],
span["tags"],
)
Expand Down

0 comments on commit f3e268a

Please sign in to comment.