)]}'
{"osprofiler/_utils.py":[{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"5c0bd0c409d0a629e7437f0d3bf50313d69059b7","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def shorten_id(span_id):"},{"line_number":155,"context_line":"    \"\"\"Convert from uuid4 to 64 bit id for OpenTracing\"\"\""},{"line_number":156,"context_line":"    int64_max \u003d (1 \u003c\u003c 64) - 1"},{"line_number":157,"context_line":"    if isinstance(span_id, six.integer_types):"},{"line_number":158,"context_line":"        return span_id \u0026 int64_max"},{"line_number":159,"context_line":"    try:"},{"line_number":160,"context_line":"        short_id \u003d uuid.UUID(span_id).int \u0026 int64_max"},{"line_number":161,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_db11f25d","line":158,"range":{"start_line":156,"start_character":0,"end_line":158,"end_character":34},"updated":"2018-10-03 09:15:23.000000000","message":"As you can see, this id is always a uuid [1].\nCan you give us an example when this id is an int?\n\n[1] http://git.openstack.org/cgit/openstack/osprofiler/tree/osprofiler/profiler.py#n361","commit_id":"01ae806f51a76d7985365c4c7d732f8ccedb7fa6"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"333137516da994dae7081cf3f86f6611fc9e3263","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def shorten_id(span_id):"},{"line_number":155,"context_line":"    \"\"\"Convert from uuid4 to 64 bit id for OpenTracing\"\"\""},{"line_number":156,"context_line":"    int64_max \u003d (1 \u003c\u003c 64) - 1"},{"line_number":157,"context_line":"    if isinstance(span_id, six.integer_types):"},{"line_number":158,"context_line":"        return span_id \u0026 int64_max"},{"line_number":159,"context_line":"    try:"},{"line_number":160,"context_line":"        short_id \u003d uuid.UUID(span_id).int \u0026 int64_max"},{"line_number":161,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_f9bcf66c","line":158,"range":{"start_line":156,"start_character":0,"end_line":158,"end_character":34},"in_reply_to":"3f79a3b5_5ef870bf","updated":"2018-10-03 10:26:33.000000000","message":"Thank you for your case.\n\nAccording to your description, I see that you may call nova api via openstack client/nova client/nova api (rest). Then you want your current trace includes trace from OSProfiler.\n\nHowever, the base trace id for OSProfiler may not work as you expect.\n\n1/ It can be auto-generated (as the link in the first comment)\n2/ Or, it can be passed from earlier span (parent span)\n\n\nFor the (1), you cannot control the ID.\nFor the (2), you have to pass an id to the init function at [1].\n\nCurrently, Are you using method (2)?\n\n[1] http://git.openstack.org/cgit/openstack/osprofiler/tree/osprofiler/profiler.py#n48","commit_id":"01ae806f51a76d7985365c4c7d732f8ccedb7fa6"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"06583bf080bde59ac5f33c4b1ab774bfe28f8f1c","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def shorten_id(span_id):"},{"line_number":155,"context_line":"    \"\"\"Convert from uuid4 to 64 bit id for OpenTracing\"\"\""},{"line_number":156,"context_line":"    int64_max \u003d (1 \u003c\u003c 64) - 1"},{"line_number":157,"context_line":"    if isinstance(span_id, six.integer_types):"},{"line_number":158,"context_line":"        return span_id \u0026 int64_max"},{"line_number":159,"context_line":"    try:"},{"line_number":160,"context_line":"        short_id \u003d uuid.UUID(span_id).int \u0026 int64_max"},{"line_number":161,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_af628214","line":158,"range":{"start_line":156,"start_character":0,"end_line":158,"end_character":34},"in_reply_to":"3f79a3b5_743f8bb4","updated":"2018-10-05 01:48:13.000000000","message":"Yep, I understand it.\n\nSo, you have to write a lot of code (to call and init osprofiler) instead of just calling via nova api.\n\nYou should add unit test for this too.\n\nThanks!","commit_id":"01ae806f51a76d7985365c4c7d732f8ccedb7fa6"},{"author":{"_account_id":20354,"name":"Shoham Peller","email":"shohamp@gmail.com","username":"shoham.peller"},"change_message_id":"94a06109f7df182c612b3f6ea4c0d8a4becce247","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def shorten_id(span_id):"},{"line_number":155,"context_line":"    \"\"\"Convert from uuid4 to 64 bit id for OpenTracing\"\"\""},{"line_number":156,"context_line":"    int64_max \u003d (1 \u003c\u003c 64) - 1"},{"line_number":157,"context_line":"    if isinstance(span_id, six.integer_types):"},{"line_number":158,"context_line":"        return span_id \u0026 int64_max"},{"line_number":159,"context_line":"    try:"},{"line_number":160,"context_line":"        short_id \u003d uuid.UUID(span_id).int \u0026 int64_max"},{"line_number":161,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_5ef870bf","line":158,"range":{"start_line":156,"start_character":0,"end_line":158,"end_character":34},"in_reply_to":"3f79a3b5_db11f25d","updated":"2018-10-03 09:28:53.000000000","message":"I have multiple services reporting to Jaeger, and eventually calling nova. I want nova to report to Jaeger as well, and the span\u0027s parent to be my services of course.\nMy services report to Jaeger using a native jaeger python client, so they get a 64-bit id, and not a uuid.\nSo when calling nova, and when nova reports to Jaeger using osprofiler, osprofiler fails since it expects it\u0027s parent id to be a uuid.\nIf the parent already supplies a valid short, jaeger-compatible ID, there\u0027s no need to shorten it.","commit_id":"01ae806f51a76d7985365c4c7d732f8ccedb7fa6"},{"author":{"_account_id":20354,"name":"Shoham Peller","email":"shohamp@gmail.com","username":"shoham.peller"},"change_message_id":"55c89510654f569e70f22243741f9d066c545ae4","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def shorten_id(span_id):"},{"line_number":155,"context_line":"    \"\"\"Convert from uuid4 to 64 bit id for OpenTracing\"\"\""},{"line_number":156,"context_line":"    int64_max \u003d (1 \u003c\u003c 64) - 1"},{"line_number":157,"context_line":"    if isinstance(span_id, six.integer_types):"},{"line_number":158,"context_line":"        return span_id \u0026 int64_max"},{"line_number":159,"context_line":"    try:"},{"line_number":160,"context_line":"        short_id \u003d uuid.UUID(span_id).int \u0026 int64_max"},{"line_number":161,"context_line":"    except ValueError:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_743f8bb4","line":158,"range":{"start_line":156,"start_character":0,"end_line":158,"end_character":34},"in_reply_to":"3f79a3b5_f9bcf66c","updated":"2018-10-03 10:37:12.000000000","message":"Yep, (2) is exactly the case","commit_id":"01ae806f51a76d7985365c4c7d732f8ccedb7fa6"}]}
