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

annotation_list_builder hangs if you pass a string instead of an integer #26

Open
drolando opened this issue Nov 30, 2016 · 1 comment

Comments

@drolando
Copy link
Contributor

from py_zipkin.thrift import annotation_list_builder

annotation_list_builder(
    {
        'sr': '1480534584',
        'ss': '1480534590',
    },
    host=endpoint
)

annotation_list_builder expects the timestamp to be an float (or int) number representing the timestamp in seconds, with and optional microsecond precision after the ..
If the timestamp is a string, it'll instead just hang forever and you'll be forced to use kill -9 to stop your script.

We should add some type validation to return an error if the timestamps are not numbers.

@mjbryant
Copy link

Interesting addition: it hangs because create_annotation is doing timestamp * 1000000. If it gets a string, it'll try to create a > 1M character string, and apparently that takes a while.

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

No branches or pull requests

2 participants