Skip to content

Commit

Permalink
don't set everything to be a sampled trace! :(
Browse files Browse the repository at this point in the history
  • Loading branch information
jtolio committed Aug 28, 2015
1 parent dc5d221 commit bcb789f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions trace/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ func RequestFromHeader(header HeaderGetter) (rv Request) {
rv.ParentId = &parent_id
}
sampled, err := strconv.ParseBool(header.Get("X-B3-Sampled"))
if err != nil {
sampled = true
if err == nil {
rv.Sampled = &sampled
}
rv.Sampled = &sampled
flags, err := fromHeader(header.Get("X-B3-Flags"))
if err != nil {
flags = 0
if err == nil {
rv.Flags = &flags
}
rv.Flags = &flags
return rv
}

Expand Down

0 comments on commit bcb789f

Please sign in to comment.