Skip to content

Breakdown metrics #535

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

Closed
wants to merge 18 commits into from
Closed

Conversation

beniwohli
Copy link
Contributor

@beniwohli beniwohli commented Jul 29, 2019

implements #479

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

Looking good! I haven't gotten to the tests yet, will take another look tomorrow. Here's my comments so far.

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

Thanks for the updates - just a couple of main issues which I missed in my first pass.


def test_bare_transaction(elasticapm_client):
elasticapm_client.begin_transaction("request")
time.sleep(0.005)
Copy link
Member

Choose a reason for hiding this comment

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

I think we should enable callers to supply the duration to end_transaction, end_span, etc. Other tracing APIs allow specifying the end timestamp, which is of dubious value given wall clocks can jump... but being able to specify the duration is at least useful here, so we can specify the duration and check the exact value below. It could also be useful for integrating with other tracing systems.

In the Go agent, we only set the span's duration in the end method if it hasn't already been set, and it looks like this approach would work well in the Python agent too -- an optional arg would be fine too. In case the duration were specified, you work out the end timestamp as self.start_time + self.duration and pass that into child_ended.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, but if you're ok with it, I'll do that in a separate PR after the 5.0 release

Copy link
Member

Choose a reason for hiding this comment

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

No worries.

Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

LGTM! Can you please create a TODO and/or issue so we don't forget to add the duration option and update the tests with exact durations?

@beniwohli beniwohli mentioned this pull request Jul 30, 2019
19 tasks
@beniwohli beniwohli closed this in 947d0b0 Jul 30, 2019
@axw axw mentioned this pull request Jul 31, 2019
1 task
@axw axw removed the [zube]: Done label Aug 6, 2019
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.

2 participants