[ 
https://issues.apache.org/jira/browse/HTRACE-209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14648433#comment-14648433
 ] 

stack commented on HTRACE-209:
------------------------------

bq. Let's just go with a git-style big 128-bit hex number.

Good by me.

A few comments on v6

Is the below from htrace-c/src/core/conf.c meant to be part of this patch?

        endptr++;

In below....

61              htrace_span_id_generate(&span_id, tracer->rnd, NULL);

... is passing NULL right? In the else, we pass in cur_scope->span...

Nit. Not important. Would it be easier if below returned true if it set span 
id?  Would it streamline use of the method in that you would not have to test 
the id for valid or empty after the call?

        58      /**
59       * Get the span id of an HTrace scope.
60       *
61       * @param scope     The trace scope, or NULL.
62       * @param id        (out param) The htrace span ID object to modify.
63       *                      It will be set to the invalid span ID if the 
scope
64       *                      is null or has no span.
65       */
66      void htrace_scope_get_span_id(const struct htrace_scope *scope,
67                                    struct htrace_span_id *id);

Should this buf size be +1?

116         char buf[HTRACE_SPAN_ID_STRING_LENGTH];

Later you do        char sbuf[HTRACE_SPAN_ID_STRING_LENGTH + 1];

You don't do the spiel about the top 64 bits being carried over from parent in 
34        * @file span_id.c or in .h (Is there anything we can do to fail if 
this is not the case)

Did you want to rename TraceTree in this patch (or do it in follow on?) Latter 
is fine by me.

This looks like left over from previous patches

23      htrace.INVALID_SPAN_ID = "00000000-0000-0000-0000-000000000000";

Ditto 64        // i.e. something like 00000000-0000-0000-0000-000000000000.

Above are nits. I'm +1 on this.  What you think [~iwasakims]?








> Make span ID 128 bit to avoid collisions
> ----------------------------------------
>
>                 Key: HTRACE-209
>                 URL: https://issues.apache.org/jira/browse/HTRACE-209
>             Project: HTrace
>          Issue Type: Sub-task
>    Affects Versions: 4.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HTRACE-209.001.patch, HTRACE-209.002.patch, 
> HTRACE-209.004.patch, HTRACE-209.005.patch, HTRACE-209.006.patch
>
>
> Make span ID 128 bit to avoid collisions in htrace 4.x



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to