-
Notifications
You must be signed in to change notification settings - Fork 10
RD-4202 - prevent collection of lumigo events #166
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
Conversation
| 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() |
There was a problem hiding this comment.
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"]) |
There was a problem hiding this comment.
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]): |
There was a problem hiding this comment.
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 Report
@@ 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 Continue to review full report at Codecov.
|
No description provided.