Skip to content

Commit b4cac7c

Browse files
committed
docs for v4
1 parent 31a159a commit b4cac7c

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## v4.0.0 - 2017-12-14
6+
7+
### Fixed
8+
9+
- `Connection` work with sockets, now only a single goroutine reads from socket.
10+
- Optimized threadsafe operations in `Connection` with channels and atomics instead of mutex.
11+
- All tests with real db moved to integration folder
12+
13+
### Added
14+
15+
- Added support for tracing with `opentracing-go`
16+
- Added a brand-new unit tests for `Connection`
17+
518
## v3.0.5 - 2017-09-28
619

720
- Fixed typo at http opts

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
![GoRethink Logo](https://raw.github.com/wiki/gorethink/gorethink/gopher-and-thinker-s.png "Golang Gopher and RethinkDB Thinker")
1111

12-
Current version: v3.0.5 (RethinkDB v2.3)
12+
Current version: v4.0.0 (RethinkDB v2.3)
1313

1414
<!-- 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)-->
1515

@@ -23,7 +23,7 @@ If you need any help you can find me on the [RethinkDB slack](http://slack.rethi
2323
go get gopkg.in/gorethink/gorethink.v4
2424
```
2525

26-
Replace `v3` with `v2` or `v1` to use previous versions.
26+
Replace `v4` with `v3` or `v2` to use previous versions.
2727

2828
## Example
2929

@@ -413,6 +413,15 @@ r.Log.Out = os.Stderr
413413
r.Log.Out = ioutil.Discard
414414
```
415415

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+
416425
## Mocking
417426

418427
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

Comments
 (0)