Skip to content

Commit 3eb6c8c

Browse files
committed
feat: fixes support for 1.10 and 1.09.
1 parent 24b349c commit 3eb6c8c

File tree

5 files changed

+423
-114
lines changed

5 files changed

+423
-114
lines changed

README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
[![Build Status](https://travis-ci.com/jcchavezs/zipkin-instrumentation-sql.svg?branch=master)](https://travis-ci.com/jcchavezs/zipkin-instrumentation-sql)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/jcchavezs/zipkin-instrumentation-sql)](https://goreportcard.com/report/github.com/jcchavezs/zipkin-instrumentation-sql)
55
[![GoDoc](https://godoc.org/github.com/jcchavezs/zipkin-instrumentation-sql?status.svg)](https://godoc.org/github.com/jcchavezs/zipkin-instrumentation-sql)
6-
[![Sourcegraph](https://sourcegraph.com/github.com/jcchavezs/zipkin-instrumentation-sql/-/badge.svg)](https://sourcegraph.com/github.com/jcchavezs/zipkin-instrumentation-sql?badge)
76

87
A SQL wrapper including Zipkin instrumentation
98

@@ -59,6 +58,21 @@ sql.Register("zipkinsql-mysql", driver)
5958
db, err = sql.Open("zipkinsql-mysql", "myDSN")
6059
```
6160

61+
Projects providing their own abstractions on top of database/sql/driver can also wrap an existing driver.Conn interface directly with zipkinsql.
62+
63+
```go
64+
65+
import "github.com/opencensus-integrations/zipkinsql"
66+
67+
func initializeConn(...) driver.Conn {
68+
// create custom driver.Conn
69+
conn := Connect(...)
70+
71+
// wrap with zipkinsql
72+
return zipkinsql.WrapConn(conn, tracer, zipkinsql.WithAllTraceOptions())
73+
}
74+
```
75+
6276
## Usage of *Context methods
6377

6478
Instrumentation is possible if the context is being passed downstream in methods.

0 commit comments

Comments
 (0)