Skip to content

Conversation

@saartochner-lumigo
Copy link
Contributor

No description provided.

def handle_timeout(self, *args):
get_logger().info("The tracer reached the end of the timeout timer")
to_send = [s for s in self.spans if s["id"] in self.span_ids_to_send]
self.span_ids_to_send.clear()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fixes the first bug: the last HTTP call looks infinite although it has finished.
It happens because this call finishes while we send the TO report. I.e. we clean the self.span_ids_to_send too late.

self.spans[-1]["ended"] = get_current_ms_time()
span = self.spans[-1]
span["ended"] = get_current_ms_time()
self.span_ids_to_send.add(span["id"])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we cleaned the self.span_ids_to_send - we should resend this span

HookedData = namedtuple("HookedData", ["headers", "path"])


def is_lumigo_edge(host: Optional[str]):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solves the second bug: when we catch our own spans.
We just need to ignore them.

@codecov
Copy link

codecov bot commented Dec 14, 2020

Codecov Report

Merging #166 (b696649) into master (827a7a9) will increase coverage by 1.31%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #166      +/-   ##
==========================================
+ Coverage   96.21%   97.53%   +1.31%     
==========================================
  Files          11       22      +11     
  Lines         952     1702     +750     
==========================================
+ Hits          916     1660     +744     
- Misses         36       42       +6     
Impacted Files Coverage Δ
lumigo_tracer/parsers/parser.py
lumigo_tracer/parsers/http_data_classes.py
lumigo_tracer/parsers/utils.py
lumigo_tracer/sync_http/handler.py
lumigo_tracer/sync_http/sync_hook.py
lumigo_tracer/parsers/event_parser.py
lumigo_tracer/utils.py
lumigo_tracer/wrappers/http/sync_http_wrappers.py 95.86% <0.00%> (ø)
lumigo_tracer/lumigo_utils.py 95.37% <0.00%> (ø)
lumigo_tracer/wrappers/__init__.py 100.00% <0.00%> (ø)
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5746414...b696649. Read the comment docs.

@saartochner-lumigo saartochner-lumigo merged commit 9e634f9 into master Dec 14, 2020
@saartochner-lumigo saartochner-lumigo deleted the RD-4202-collect-lumigo-events branch December 14, 2020 12:40
saartochner-lumigo pushed a commit that referenced this pull request Dec 14, 2020
…umigo events (#166)

5746414 layers-table: layers md [skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants