Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #35 from dennwc/opentracing
Browse files Browse the repository at this point in the history
Update SDK and enable OpenTracing
  • Loading branch information
bzz authored Nov 28, 2018
2 parents a056147 + 1e3b274 commit f42818b
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 5 deletions.
65 changes: 62 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

[[constraint]]
name = "gopkg.in/bblfsh/sdk.v2"
version = "v2.6.x"
version = "2.9.x"

[prune]
go-tests = true
Expand Down
7 changes: 6 additions & 1 deletion driver/golang/golang.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package golang

import (
"context"
"go/ast"
"go/parser"
"go/token"
"reflect"

"context"
"github.com/opentracing/opentracing-go"

"gopkg.in/bblfsh/sdk.v2/uast"
"gopkg.in/bblfsh/sdk.v2/uast/nodes"
)
Expand Down Expand Up @@ -145,5 +147,8 @@ func (Driver) Close() error {
return nil
}
func (Driver) Parse(ctx context.Context, code string) (nodes.Node, error) {
sp, _ := opentracing.StartSpanFromContext(ctx, "go.Parse")
defer sp.Finish()

return Parse(code)
}

0 comments on commit f42818b

Please sign in to comment.