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

fix: Remove an unsupported top level span attribute. #630

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions src/instana/span/base_span.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ def __init__(self, span: Type["Span"], source, **kwargs) -> None:
# pylint: disable=invalid-name
self.t = span.context.trace_id
self.p = span.parent_id
# self.p = span.context.span_id if span.context.is_remote else None
self.s = span.context.span_id
self.l = span.context.level
self.ts = round(span.start_time / 10**6)
self.d = round(span.duration / 10**6) if span.duration else None
self.f = source
Expand Down
6 changes: 0 additions & 6 deletions tests/frameworks/test_flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,6 @@ def test_get_request_with_suppression(self) -> None:
# This should not be present
assert response.headers.get("tracestate", None) is None

# Assert that there isn't any span, where level is not 0!
assert any(map(lambda x: x.l != 0, spans)) is False

# Assert that there are no spans in the recorded list
assert spans == []

Expand All @@ -232,9 +229,6 @@ def test_get_request_with_suppression_and_w3c(self) -> None:
# The 'in=' section can not be in the tracestate
assert "in=" not in response.headers["tracestate"]

# Assert that there isn't any span, where level is not 0!
assert any(map(lambda x: x.l != 0, spans)) is False

# Assert that there are no spans in the recorded list
assert spans == []

Expand Down
2 changes: 0 additions & 2 deletions tests/span/test_base_span.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def test_basespan(
"t": trace_id,
"p": None,
"s": span_id,
"l": 1,
"ts": round(span.start_time / 10**6),
"d": None,
"f": None,
Expand All @@ -32,7 +31,6 @@ def test_basespan(
assert expected_dict["t"] == base_span.t
assert expected_dict["s"] == base_span.s
assert expected_dict["p"] == base_span.p
assert expected_dict["l"] == base_span.l
assert expected_dict["ts"] == base_span.ts
assert expected_dict["d"] == base_span.d
assert not base_span.f
Expand Down
Loading