Merged
Conversation
6f664d3 to
c27b74b
Compare
adamchainz
commented
Jul 4, 2019
src/scout_apm/celery.py
Outdated
| except TypeError: | ||
| pass | ||
| else: | ||
| span.tag("queue_time", queue_time) |
Contributor
Author
There was a problem hiding this comment.
I'm guessing this should be a request tag (aka context) instead of a span tag @dlanderson / @cschneid ? same as discussion on the other celery PR https://github.com/scoutapp/scout_apm_python/pull/205/files#r300129980
Contributor
There was a problem hiding this comment.
Yes, a request tag is better here. Especially since it's not describing "the section of code that is running", it's saying something about the request as a whole.
91380a1 to
0881794
Compare
c27b74b to
eb108c0
Compare
Fixes #35. Track the queue time by using an extra haeder to track when the task is added to the queue and comparing when it gets executed. This should work in most setups but if the celery app isn't all set up on the producer side, we are well defended against it. Like #205, I manually tested on Celery 3.1.x locally by editing `tox.ini` and reinstalling with `tox -r`.
eb108c0 to
0bbf099
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #35. Track the queue time by using an extra haeder to track when the task is added to the queue and comparing when it gets executed. This should work in most setups but if the celery app isn't all set up on the producer side, we are well defended against it.
Like #205, I manually tested on Celery 3.1.x locally by editing
tox.iniand reinstalling withtox -r.