Skip to content
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

ref(tracing): Pre-traces_sampler documentation additions #865

Merged
merged 4 commits into from
Oct 16, 2020

Conversation

lobsterkatie
Copy link
Member

A bunch of comments and docstrings which got added while I was working on #863. Also adds data to both the Span and Transaction reprs, and changes a handful of variable names to be more accurate. No behavior changes.


If the 'sentry-trace' header is malformed or missing, just create and
return a Transaction instance with the given params.
"""
# type: (...) -> Transaction
Copy link

Choose a reason for hiding this comment

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

The linter doesn't seem to like this order of type comment after the docstring?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, that's what it was mad about! The problematic ordering predates me, so I figured it was just the linter not being 100% on board with type hints. Fixed now, thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ugh. After a lot of poking, I figured out what the problem is: mypy wants the type annotations before the docstring, whereas pylance (the VSCode Python engine) very much wants them after. So now my editor is all kinds of mad, but at least CI is passing.

tests/integrations/stdlib/test_httplib.py Show resolved Hide resolved
@lobsterkatie lobsterkatie force-pushed the kmclb-pre-traces-sampler-comments branch from fdb9a3e to 95e0383 Compare October 16, 2020 15:23
@lobsterkatie lobsterkatie force-pushed the kmclb-pre-traces-sampler-comments branch from cbd6ff1 to bf5977e Compare October 16, 2020 15:37
@lobsterkatie lobsterkatie merged commit e873bdb into master Oct 16, 2020
@lobsterkatie lobsterkatie deleted the kmclb-pre-traces-sampler-comments branch October 16, 2020 16:29
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