Skip to content

Commit

Permalink
trees: drop use of trace.Attribute (#1130)
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddrysdale authored May 8, 2018
1 parent 9d8d28c commit 1338abf
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions trees/trees.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,21 +158,15 @@ func validate(o GetOpts, tree *trillian.Tree) error {
func GetTree(ctx context.Context, s storage.AdminStorage, treeID int64, opts GetOpts) (*trillian.Tree, error) {
ctx, span := spanFor(ctx, "GetTree")
defer span.End()
cachedTree := true
tree, ok := FromContext(ctx)
if !ok || tree.TreeId != treeID {
cachedTree = false
var err error
tree, err = storage.GetTree(ctx, s, treeID)
if err != nil {
return nil, err
}
}

if span.IsRecordingEvents() {
span.AddAttributes(trace.BoolAttribute("cached-tree", cachedTree))
}

if err := validate(opts, tree); err != nil {
return nil, err
}
Expand Down

0 comments on commit 1338abf

Please sign in to comment.