Skip to content

Commit

Permalink
Merge pull request #2 from jcchavezs/adds_support_for_1.10_1.09
Browse files Browse the repository at this point in the history
feat: fixes support for 1.10 and 1.09.
  • Loading branch information
jcchavezs authored Dec 3, 2018
2 parents 0726e98 + 3eb6c8c commit 7900e02
Show file tree
Hide file tree
Showing 5 changed files with 423 additions and 114 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[![Build Status](https://travis-ci.com/jcchavezs/zipkin-instrumentation-sql.svg?branch=master)](https://travis-ci.com/jcchavezs/zipkin-instrumentation-sql)
[![Go Report Card](https://goreportcard.com/badge/github.com/jcchavezs/zipkin-instrumentation-sql)](https://goreportcard.com/report/github.com/jcchavezs/zipkin-instrumentation-sql)
[![GoDoc](https://godoc.org/github.com/jcchavezs/zipkin-instrumentation-sql?status.svg)](https://godoc.org/github.com/jcchavezs/zipkin-instrumentation-sql)
[![Sourcegraph](https://sourcegraph.com/github.com/jcchavezs/zipkin-instrumentation-sql/-/badge.svg)](https://sourcegraph.com/github.com/jcchavezs/zipkin-instrumentation-sql?badge)

A SQL wrapper including Zipkin instrumentation

Expand Down Expand Up @@ -59,6 +58,21 @@ sql.Register("zipkinsql-mysql", driver)
db, err = sql.Open("zipkinsql-mysql", "myDSN")
```

Projects providing their own abstractions on top of database/sql/driver can also wrap an existing driver.Conn interface directly with zipkinsql.

```go

import "github.com/opencensus-integrations/zipkinsql"

func initializeConn(...) driver.Conn {
// create custom driver.Conn
conn := Connect(...)

// wrap with zipkinsql
return zipkinsql.WrapConn(conn, tracer, zipkinsql.WithAllTraceOptions())
}
```

## Usage of *Context methods

Instrumentation is possible if the context is being passed downstream in methods.
Expand Down
Loading

0 comments on commit 7900e02

Please sign in to comment.