Skip to content

Commit

Permalink
feat: adds initial code.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcchavezs committed Oct 10, 2018
0 parents commit c6d4fcf
Show file tree
Hide file tree
Showing 4 changed files with 592 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sudo: false
language: go
go:
- 1.8.x
- 1.9.x
- 1.10.x
- 1.11.x
- master

before_script:
- go get -u golang.org/x/lint/golint

script:
- go vet ./...
- golint ./..
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Zipkin instrumentation SQL

A sql wrapper including Zipkin instrumentation

## Usage

```go
import (
_ "github.com/go-sql-driver/mysql"
zipkinsql "github.com/jcchavezs/zipkin-instrumentation-sql"
)

var (
driverName string
err error
db *sql.DB
)

// Register our zipkinsql wrapper for the provided MySQL driver.
driverName, err = zipkinsql.Register("mysql", zipkinsql.WithAllTraceOptions())
if err != nil {
log.Fatalf("unable to register zipkin driver: %v\n", err)
}

// Connect to a MySQL database using the ocsql driver wrapper.
db, err = sql.Open(driverName, "myDSN")
```
Loading

0 comments on commit c6d4fcf

Please sign in to comment.