You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
10
10

11
11
12
-
Current version: v3.0.5 (RethinkDB v2.3)
12
+
Current version: v4.0.0 (RethinkDB v2.3)
13
13
14
14
<!-- This project is no longer maintained, for more information see the [v3.0.0 release](https://github.com/gorethink/gorethink/releases/tag/v3.0.0)-->
15
15
@@ -23,7 +23,7 @@ If you need any help you can find me on the [RethinkDB slack](http://slack.rethi
23
23
go get gopkg.in/gorethink/gorethink.v4
24
24
```
25
25
26
-
Replace `v3` with `v2` or `v1` to use previous versions.
26
+
Replace `v4` with `v3` or `v2` to use previous versions.
27
27
28
28
## Example
29
29
@@ -413,6 +413,15 @@ r.Log.Out = os.Stderr
413
413
r.Log.Out = ioutil.Discard
414
414
```
415
415
416
+
## Tracing
417
+
418
+
The driver supports [opentracing-go](https://github.com/opentracing/opentracing-go/). You can enable this feature by setting `UseOpentracing` to true in the `ConnectOpts`. Then driver will expect `opentracing.Span` in the `RunOpts.Context` and will start new child spans for queries.
419
+
Also you need to configure tracer in your program by yourself.
420
+
421
+
The driver starts span for the whole query, from the first byte is sent to the cursor closed, and second-level span for each query for fetching data.
422
+
423
+
So you can trace how much time you program spends for RethinkDB queries.
424
+
416
425
## Mocking
417
426
418
427
The driver includes the ability to mock queries meaning that you can test your code without needing to talk to a real RethinkDB cluster, this is perfect for ensuring that your application has high unit test coverage.
0 commit comments