Skip to content

Conversation

beniwohli
Copy link
Contributor

What does this pull request do?

See elastic/apm#432

Related issues

closes #1152

@ghost
Copy link

ghost commented Sep 9, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-10-15T22:48:36.031+0000

  • Duration: 29 min 29 sec

  • Commit: ad9bdac

Test stats 🧪

Test Results
Failed 0
Passed 10071
Skipped 8977
Total 19048

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.
Copy link
Contributor

@basepi basepi left a comment

Choose a reason for hiding this comment

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

Did a brief review, everything looks good so far! I'll do a deeper review once this is ready for review.

I noticed that you haven't really refactored leaf to exit -- is that still something we want to do? I made a note here after one of our previous discussions.

def report(self) -> None:
self.tracer.queue_func(SPAN, self.to_dict())

def try_to_compress(self, sibling: SpanType) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe some docstrings through here so we can remember at a glance what composite vs regular means?

@beniwohli
Copy link
Contributor Author

I noticed that you haven't really refactored leaf to exit -- is that still something we want to do? I made a note here after one of our previous discussions.

I started it implementing in this branch, but soon realized that it would overload it (something that also became apparent with introducing type hints with this PR, hence I only committed the ones in tracing.py). The plan is to implement it in #1159, which is a smaller change in general, but also depends on an exit flag.

This cleans up a wart where `traceparent` is initialized to None, and needs to be set by the callee right after, as there is code that assumes `traceparent` to be set.
we no longer only call `child_ended` for breakdown metrics
@beniwohli beniwohli marked this pull request as ready for review September 29, 2021 14:37
Copy link
Contributor

@basepi basepi left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link
Contributor

@basepi basepi left a comment

Choose a reason for hiding this comment

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

Docs look good!

beniwohli added a commit to beniwohli/apm-agent-python that referenced this pull request Oct 13, 2021
beniwohli added a commit that referenced this pull request Oct 13, 2021
@beniwohli beniwohli merged commit 9624775 into elastic:master Oct 16, 2021
@beniwohli beniwohli deleted the compress-spans branch October 16, 2021 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants